5 use Illuminate\Database\Eloquent\Model;
7 class Permission extends Model
10 * The roles that belong to the permission.
12 public function roles()
14 return $this->belongsToMany('BookStack\Permissions');
18 * Get the permission object by name.
22 public static function getByName($name)
24 return static::where('name', '=', $name)->first();