improvements
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\UserManagement\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
final class Permission extends Model
|
||||
{
|
||||
protected $table = 'user_management_permissions';
|
||||
|
||||
protected $fillable = ['name', 'slug', 'description'];
|
||||
|
||||
public function roles(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Role::class,
|
||||
'user_management_permission_role',
|
||||
'permission_id',
|
||||
'role_id'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user