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