Let route names and tables move, and add manager:import
This commit is contained in:
1 parent
984024eb85
commit
60ad85a621
45 files changed
+491
-73
No files matched your search
@@ -5,6 +5,7 @@ namespace IriksIT\Manager\Concerns;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use IriksIT\Manager\Models\Group;
|
||||
use IriksIT\Manager\Support\ModuleRegistry;
|
||||
use IriksIT\Manager\Support\Names;
|
||||
|
||||
/**
|
||||
* Put this on the User model of the host app (needs the Users module).
|
||||
@@ -18,7 +19,7 @@ trait HasManagerAccess
|
||||
/** @return BelongsToMany<Group, $this> */
|
||||
public function managerGroups(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Group::class, config('manager.table_prefix').'group_user', 'user_id', 'group_id');
|
||||
return $this->belongsToMany(Group::class, Names::table('group_user'), 'user_id', 'group_id');
|
||||
}
|
||||
|
||||
public function isManagerSuperAdmin(): bool
|
||||
|
||||
Reference in new issue
Block a user