19 lines
327 B
PHP
19 lines
327 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Permission extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = ['name', 'slug', 'resource', 'action'];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The roles that belong to the permission.
|
||
|
|
*/
|
||
|
|
public function roles()
|
||
|
|
{
|
||
|
|
return $this->belongsToMany(Role::class);
|
||
|
|
}
|
||
|
|
}
|