1 | <?php |
||
10 | class UserController extends ResourceController |
||
11 | { |
||
12 | protected array $indexWidgets = [ |
||
|
|||
13 | '\Microboard\Widgets\UsersInThisMonth' => [ |
||
14 | 'size' => 'col-md-6' |
||
15 | ], |
||
16 | '\Microboard\Widgets\PopularRole' => [ |
||
17 | 'size' => 'col-md-6' |
||
18 | ] |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * @param UpdateFormRequest $request |
||
23 | * @param User $model |
||
24 | * @return mixed|void |
||
25 | */ |
||
26 | protected function created($request, $model) |
||
27 | { |
||
28 | addMediaTo($model, 'avatar'); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param UpdateFormRequest $request |
||
33 | * @param User $model |
||
34 | * @return mixed|void |
||
35 | */ |
||
36 | protected function updated($request, $model) |
||
37 | { |
||
38 | addMediaTo($model, 'avatar'); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function getStoreFormRequest(): string |
||
45 | { |
||
46 | return StoreFormRequest::class; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | protected function getUpdateFormRequest(): string |
||
53 | { |
||
54 | return UpdateFormRequest::class; |
||
55 | } |
||
56 | |||
65 |