]> BookStack Code Mirror - bookstack/blob - app/Auth/Permissions/EntityPermission.php
ef61e03ceb24d27edb289166d1ec744a95034f67
[bookstack] / app / Auth / Permissions / EntityPermission.php
1 <?php namespace BookStack\Auth\Permissions;
2
3 use BookStack\Model;
4
5 class EntityPermission extends Model
6 {
7
8     protected $fillable = ['role_id', 'action'];
9     public $timestamps = false;
10
11     /**
12      * Get all this restriction's attached entity.
13      * @return \Illuminate\Database\Eloquent\Relations\MorphTo
14      */
15     public function restrictable()
16     {
17         return $this->morphTo('restrictable');
18     }
19 }