1 <?php namespace BookStack;
3 use Illuminate\Database\Eloquent\Model;
5 class Permission extends Model
8 * The roles that belong to the permission.
10 public function roles()
12 return $this->belongsToMany('BookStack\Role');
16 * Get the permission object by name.
20 public static function getByName($name)
22 return static::where('name', '=', $name)->first();