set the notification getting system by created_at desc order
This commit is contained in:
@@ -12,8 +12,13 @@ class NotificationsController extends Controller
|
||||
{
|
||||
public function getNotifications(Request $request): JsonResponse {
|
||||
try {
|
||||
$notif = $request->user()
|
||||
->notifications()
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return response()->json([
|
||||
'data' => $request->user()->notifications
|
||||
'data' => $notif
|
||||
]);
|
||||
} catch(\Exception $e) {
|
||||
Log::info($e->getMessage());
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="logoIcone.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Comité des fêtes de Beaupont</title>
|
||||
<script type="module" crossorigin src="/assets/index-CeLi4uhf.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-YuAySMyG.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DBz-GVvs.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user