protected function hasPermission($permission): bool
    {
        return (bool) $this->permissions->where('slug', $permission->slug)->count();
    }
protected function hasPermission($permission): bool
    {
        return (bool) $this->permissions->where('slug', $permission->slug)->count();
    }
protected function hasPermission ( $ permission ) : bool { return ( bool ) $ this -> permissions -> where ( 'slug' , $ permission -> slug ) -> count ( ) ; }
Checks if the user has the given permission assigned.

@param  \Caffeinated\Shinobi\Models\Permission  $permission
@return boolean
Checks if the user has the given permission assigned .