updated notification with pagination and loading indicator

This commit is contained in:
Jack Goh
2018-09-03 12:09:56 +08:00
parent 5cecb731f6
commit 467f924a30
3 changed files with 34 additions and 54 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class UserController extends Controller
public function notifications()
{
$notifications = auth()->user()->unreadNotifications()->limit(5)->get();
$notifications = auth()->user()->unreadNotifications()->paginate(10);
return response()->json(['notifications'=> $notifications], 200);
}
}