Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function __invoke($id) |
||
15 | { |
||
16 | $this->authorize('manage', User::class); |
||
17 | |||
18 | $user = User::withTrashed()->where('username', $id)->firstOrFail(); |
||
19 | $user->restore(); |
||
20 | |||
21 | event(new UserReactivatedEvent($user)); |
||
22 | return back()->with([ |
||
23 | 'message' => $user->full_name.' successfully re-activated', |
||
24 | 'type' => 'success', |
||
25 | ]); |
||
28 |