first init
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Role\Repositories\Contracts;
|
||||
|
||||
use Modules\Role\Entities\Role;
|
||||
|
||||
interface RoleRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Get all roles
|
||||
*/
|
||||
public function all();
|
||||
|
||||
/**
|
||||
* Find role by ID
|
||||
*/
|
||||
public function find($id);
|
||||
|
||||
/**
|
||||
* Find role by ID (alias for find)
|
||||
*/
|
||||
public function findById($id);
|
||||
|
||||
/**
|
||||
* Create a new role
|
||||
*/
|
||||
public function create(array $data);
|
||||
|
||||
/**
|
||||
* Update role
|
||||
*/
|
||||
public function update($id, array $data);
|
||||
|
||||
/**
|
||||
* Delete role
|
||||
*/
|
||||
public function delete($id);
|
||||
|
||||
/**
|
||||
* Get roles with permissions
|
||||
*/
|
||||
public function withPermissions($search = '');
|
||||
|
||||
/**
|
||||
* Sync permissions for a role
|
||||
*/
|
||||
public function syncPermissions(Role $role, array $permissionIds);
|
||||
}
|
||||
Reference in New Issue
Block a user