2016-04-30 12:16:06 -04:00
|
|
|
<?php namespace BookStack;
|
2016-04-20 16:37:57 -04:00
|
|
|
|
|
|
|
class EntityPermission extends Model
|
|
|
|
{
|
|
|
|
|
2016-05-01 16:20:50 -04:00
|
|
|
protected $fillable = ['role_id', 'action'];
|
|
|
|
public $timestamps = false;
|
2016-04-20 16:37:57 -04:00
|
|
|
|
|
|
|
/**
|
2016-05-01 16:20:50 -04:00
|
|
|
* Get all this restriction's attached entity.
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
2016-04-20 16:37:57 -04:00
|
|
|
*/
|
2016-05-01 16:20:50 -04:00
|
|
|
public function restrictable()
|
2016-04-20 16:37:57 -04:00
|
|
|
{
|
2016-05-01 16:20:50 -04:00
|
|
|
return $this->morphTo('restrictable');
|
2016-04-20 16:37:57 -04:00
|
|
|
}
|
|
|
|
}
|