1 | <?php namespace Modules\User\Repositories\Usher; |
||
6 | class UsherRoleRepository implements RoleRepository |
||
7 | { |
||
8 | /** |
||
9 | * @var UsherRoleRepo |
||
10 | */ |
||
11 | protected $role; |
||
12 | |||
13 | /** |
||
14 | * @param UsherRoleRepo $role |
||
15 | */ |
||
16 | public function __construct(UsherRoleRepo $role) |
||
20 | |||
21 | /** |
||
22 | * Return all the roles |
||
23 | * @return mixed |
||
24 | */ |
||
25 | public function all() |
||
29 | |||
30 | /** |
||
31 | * Create a role resource |
||
32 | * @return mixed |
||
33 | */ |
||
34 | public function create($data) |
||
49 | |||
50 | /** |
||
51 | * Find a role by its id |
||
52 | * @param $id |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function find($id) |
||
59 | |||
60 | /** |
||
61 | * Update a role |
||
62 | * @param $id |
||
63 | * @param $data |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function update($id, $data) |
||
80 | |||
81 | /** |
||
82 | * Delete a role |
||
83 | * @param $id |
||
84 | * @return mixed |
||
85 | */ |
||
86 | public function delete($id) |
||
92 | |||
93 | /** |
||
94 | * Find a role by its name |
||
95 | * @param string $name |
||
96 | * @return mixed |
||
97 | */ |
||
98 | public function findByName($name) |
||
102 | } |
||
103 |