wip
This commit is contained in:
@@ -57,6 +57,6 @@ trait RoleCheckers
|
||||
*/
|
||||
public function isSystemUser(): bool
|
||||
{
|
||||
return $this->roles->count > 0;
|
||||
return $this->roles->count() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Modules\UserAdjustments\Traits;
|
||||
|
||||
use App\Modules\Branch\Models\Branch;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
/**
|
||||
@@ -61,4 +63,14 @@ trait UserAdjustments
|
||||
{
|
||||
return (string) $this->getOption('passport_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Branches associated with user
|
||||
*
|
||||
* @return BelongsToMany<Branch>
|
||||
*/
|
||||
public function branches(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Branch::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user