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