mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 12:34:13 +00:00
create notification for each step done. Make unread message bold.
This commit is contained in:
@@ -11,7 +11,7 @@ class NotificationController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return Notification::all();
|
||||
return Notification::all()->orderby('updated_at','desc');
|
||||
}
|
||||
|
||||
public function show(Notification $notification)
|
||||
@@ -43,11 +43,11 @@ class NotificationController extends Controller
|
||||
public function getUserMessage()
|
||||
{
|
||||
return response()->json([
|
||||
"message" =>Notification::Where("user_id",Auth::user()->id)->get(),
|
||||
"message" =>Notification::Where("user_id",Auth::user()->id)->orderby('updated_at','desc')->get(),
|
||||
"unread_message" =>Notification::Where([
|
||||
["user_id",Auth::user()->id],
|
||||
["is_read",0]
|
||||
])->get()
|
||||
])->orderby('updated_at','desc')->get()
|
||||
],200);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user