mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-20 21:04:34 +00:00
add time_interval feature in notification
This commit is contained in:
@@ -42,8 +42,11 @@ class NotificationController extends Controller
|
||||
|
||||
public function getUserMessage()
|
||||
{
|
||||
$user_all_notification = Notification::Where("user_id",Auth::user()->id)->orderby('updated_at','desc')->get();
|
||||
|
||||
|
||||
return response()->json([
|
||||
"message" =>Notification::Where("user_id",Auth::user()->id)->orderby('updated_at','desc')->get(),
|
||||
"message" =>$user_all_notification,
|
||||
"unread_message" =>Notification::Where([
|
||||
["user_id",Auth::user()->id],
|
||||
["is_read",0]
|
||||
@@ -57,4 +60,6 @@ class NotificationController extends Controller
|
||||
->update(array('is_read' => 1));
|
||||
return response()->json("Read message", 200);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user