芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/panoramawholesale.com/app/Models/Permission.php
belongsToMany(Role::class); } /** * Determine if the permission belongs to the role. * * @param mixed $role * @return boolean */ public function inRole($role) { if (is_string($role)) { return $this->roles->contains('name', $role); } return !!$role->intersect($this->roles)->count(); } }