Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class NotificationController extends Controller |
||
10 | { |
||
11 | public function all() |
||
12 | { |
||
13 | return auth()->user()->notifications; |
||
14 | } |
||
15 | |||
16 | public function unread() |
||
17 | { |
||
18 | return auth()->user()->unreadNotifications()->get(); |
||
19 | } |
||
20 | |||
21 | public function delete(DatabaseNotification $notification) |
||
22 | { |
||
23 | return $notification->save(['read_at' => Carbon::now()]); |
||
24 | } |
||
25 | |||
26 | public function show(DatabaseNotification $notification) |
||
29 | } |
||
30 | } |
||
31 |