src/Traits/HasPermissionsTrait.php
public function hasDirectPermission($permission)
    {
        $name = $permission instanceof Permission ? $permission->name : $permission;
        return (bool) $this->permissions->where('name', $name)->count();
    }
public function hasDirectPermission($permission)
    {
        $name = $permission instanceof Permission ? $permission->name : $permission;
        return (bool) $this->permissions->where('name', $name)->count();
    }
public function hasDirectPermission ( $ permission ) { $ name = $ permission instanceof Permission ? $ permission -> name : $ permission ; return ( bool ) $ this -> permissions -> where ( 'name' , $ name ) -> count ( ) ; }
Has direct permission

@param Permission|string $permission
@return boolean
Has direct permission