@@ -6,25 +6,25 @@ |
||
6 | 6 | |
7 | 7 | class InsertRole extends FormRequest |
8 | 8 | { |
9 | - /** |
|
10 | - * Determine if the user is authorized to make this request. |
|
11 | - * |
|
12 | - * @return bool |
|
13 | - */ |
|
14 | - public function authorize() |
|
15 | - { |
|
16 | - return true; |
|
17 | - } |
|
9 | + /** |
|
10 | + * Determine if the user is authorized to make this request. |
|
11 | + * |
|
12 | + * @return bool |
|
13 | + */ |
|
14 | + public function authorize() |
|
15 | + { |
|
16 | + return true; |
|
17 | + } |
|
18 | 18 | |
19 | - /** |
|
20 | - * Get the validation rules that apply to the request. |
|
21 | - * |
|
22 | - * @return array |
|
23 | - */ |
|
24 | - public function rules() |
|
25 | - { |
|
26 | - return [ |
|
27 | - // |
|
28 | - ]; |
|
29 | - } |
|
19 | + /** |
|
20 | + * Get the validation rules that apply to the request. |
|
21 | + * |
|
22 | + * @return array |
|
23 | + */ |
|
24 | + public function rules() |
|
25 | + { |
|
26 | + return [ |
|
27 | + // |
|
28 | + ]; |
|
29 | + } |
|
30 | 30 | } |
@@ -6,25 +6,25 @@ |
||
6 | 6 | |
7 | 7 | class UpdateRole extends FormRequest |
8 | 8 | { |
9 | - /** |
|
10 | - * Determine if the user is authorized to make this request. |
|
11 | - * |
|
12 | - * @return bool |
|
13 | - */ |
|
14 | - public function authorize() |
|
15 | - { |
|
16 | - return true; |
|
17 | - } |
|
9 | + /** |
|
10 | + * Determine if the user is authorized to make this request. |
|
11 | + * |
|
12 | + * @return bool |
|
13 | + */ |
|
14 | + public function authorize() |
|
15 | + { |
|
16 | + return true; |
|
17 | + } |
|
18 | 18 | |
19 | - /** |
|
20 | - * Get the validation rules that apply to the request. |
|
21 | - * |
|
22 | - * @return array |
|
23 | - */ |
|
24 | - public function rules() |
|
25 | - { |
|
26 | - return [ |
|
27 | - // |
|
28 | - ]; |
|
29 | - } |
|
19 | + /** |
|
20 | + * Get the validation rules that apply to the request. |
|
21 | + * |
|
22 | + * @return array |
|
23 | + */ |
|
24 | + public function rules() |
|
25 | + { |
|
26 | + return [ |
|
27 | + // |
|
28 | + ]; |
|
29 | + } |
|
30 | 30 | } |
@@ -10,51 +10,51 @@ |
||
10 | 10 | |
11 | 11 | class RoleController extends BaseApiController |
12 | 12 | { |
13 | - /** |
|
14 | - * List of all route actions that the base api controller |
|
15 | - * will skip permissions check for them. |
|
16 | - * @var array |
|
17 | - */ |
|
18 | - protected $skipPermissionCheck = []; |
|
13 | + /** |
|
14 | + * List of all route actions that the base api controller |
|
15 | + * will skip permissions check for them. |
|
16 | + * @var array |
|
17 | + */ |
|
18 | + protected $skipPermissionCheck = []; |
|
19 | 19 | |
20 | - /** |
|
21 | - * List of all route actions that the base api controller |
|
22 | - * will skip login check for them. |
|
23 | - * @var array |
|
24 | - */ |
|
25 | - protected $skipLoginCheck = []; |
|
20 | + /** |
|
21 | + * List of all route actions that the base api controller |
|
22 | + * will skip login check for them. |
|
23 | + * @var array |
|
24 | + */ |
|
25 | + protected $skipLoginCheck = []; |
|
26 | 26 | |
27 | - /** |
|
28 | - * Init new object. |
|
29 | - * |
|
30 | - * @param RoleRepository $repo |
|
31 | - * @param CoreConfig $config |
|
32 | - * @return void |
|
33 | - */ |
|
34 | - public function __construct(RoleRepository $repo, CoreConfig $config) |
|
35 | - { |
|
36 | - parent::__construct($repo, $config, 'App\Modules\Roles\Http\Resources\Role'); |
|
37 | - } |
|
27 | + /** |
|
28 | + * Init new object. |
|
29 | + * |
|
30 | + * @param RoleRepository $repo |
|
31 | + * @param CoreConfig $config |
|
32 | + * @return void |
|
33 | + */ |
|
34 | + public function __construct(RoleRepository $repo, CoreConfig $config) |
|
35 | + { |
|
36 | + parent::__construct($repo, $config, 'App\Modules\Roles\Http\Resources\Role'); |
|
37 | + } |
|
38 | 38 | |
39 | - /** |
|
40 | - * Insert the given model to storage. |
|
41 | - * |
|
42 | - * @param InsertRole $request |
|
43 | - * @return \Illuminate\Http\Response |
|
44 | - */ |
|
45 | - public function insert(InsertRole $request) |
|
46 | - { |
|
47 | - return new $this->modelResource($this->repo->save($request->all())); |
|
48 | - } |
|
39 | + /** |
|
40 | + * Insert the given model to storage. |
|
41 | + * |
|
42 | + * @param InsertRole $request |
|
43 | + * @return \Illuminate\Http\Response |
|
44 | + */ |
|
45 | + public function insert(InsertRole $request) |
|
46 | + { |
|
47 | + return new $this->modelResource($this->repo->save($request->all())); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * Update the given model to storage. |
|
52 | - * |
|
53 | - * @param UpdateRole $request |
|
54 | - * @return \Illuminate\Http\Response |
|
55 | - */ |
|
56 | - public function update(UpdateRole $request) |
|
57 | - { |
|
58 | - return new $this->modelResource($this->repo->save($request->all())); |
|
59 | - } |
|
50 | + /** |
|
51 | + * Update the given model to storage. |
|
52 | + * |
|
53 | + * @param UpdateRole $request |
|
54 | + * @return \Illuminate\Http\Response |
|
55 | + */ |
|
56 | + public function update(UpdateRole $request) |
|
57 | + { |
|
58 | + return new $this->modelResource($this->repo->save($request->all())); |
|
59 | + } |
|
60 | 60 | } |
@@ -5,14 +5,14 @@ |
||
5 | 5 | |
6 | 6 | class RoleRepository extends BaseRepository |
7 | 7 | { |
8 | - /** |
|
9 | - * Init new object. |
|
10 | - * |
|
11 | - * @param Role $model |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function __construct(Role $model) |
|
15 | - { |
|
16 | - parent::__construct($model); |
|
17 | - } |
|
8 | + /** |
|
9 | + * Init new object. |
|
10 | + * |
|
11 | + * @param Role $model |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function __construct(Role $model) |
|
15 | + { |
|
16 | + parent::__construct($model); |
|
17 | + } |
|
18 | 18 | } |