Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class NotificationController extends Controller |
||
16 | { |
||
17 | protected $service; |
||
18 | |||
19 | /** |
||
20 | * NotificationController constructor. |
||
21 | * @param $service |
||
22 | */ |
||
23 | public function __construct(NotificationServiceContract $service) |
||
24 | { |
||
25 | $this->service = $service; |
||
26 | } |
||
27 | |||
28 | public function all() |
||
29 | { |
||
30 | return NotificationResource::collection($this->service->allNotificationsByUser(get_authenticated_user())); |
||
31 | } |
||
32 | |||
33 | public function allUnread() |
||
36 | } |
||
37 | |||
38 | public function read($id) |
||
44 | ]); |
||
45 | } |
||
46 | |||
47 | public function unread($id) |
||
53 | ]); |
||
54 | } |
||
56 |