+ Udpdate notifications routes
This commit is contained in:
parent
559ceda346
commit
495bedc6fd
|
@ -43,5 +43,12 @@ class NotificationController extends Controller
|
|||
return $this->successResponse($notifications);
|
||||
}
|
||||
|
||||
public function readNotification($id_notif){
|
||||
$notif = Notification::findOrFail($id_notif);
|
||||
$notif->read = true;
|
||||
$notif->save();
|
||||
return $this->successResponse('Success');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -26,4 +26,5 @@ $router->group(['prefix'=>'/onesignal'], function () use ($router) {
|
|||
|
||||
$router->group(['prefix'=>'/notifications'], function () use ($router) {
|
||||
$router->post('', 'NotificationController@getNotifcations');
|
||||
$router->put('update/{id_notif}', 'NotificationController@readNotification');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue