💄 Ajoute la pagination
This commit is contained in:
@@ -44,7 +44,7 @@ class DashboardController extends Controller
|
||||
$image_counts = Post::where('user_id', Auth::user()->getAuthIdentifier())
|
||||
->where('image', '!=', 'null')
|
||||
->count();
|
||||
$posts = Post::where('user_id', $user_id)->orderBy('date_post', 'DESC')->limit(9)->get();
|
||||
$posts = Post::where('user_id', $user_id)->orderBy('date_post', 'DESC')->paginate(9);
|
||||
$today_post = Post::whereDate('date_post', '=', $today->format('Y-m-d'))
|
||||
->where('user_id', $user_id)
|
||||
->count();
|
||||
|
@@ -51,7 +51,7 @@ class ImageController extends Controller
|
||||
$posts_with_image = Post::where('user_id', Auth::user()->getAuthIdentifier())
|
||||
->where('image', '!=', 'null')
|
||||
->orderBy('created_at', 'desc')
|
||||
->paginate(30);
|
||||
->paginate(9);
|
||||
|
||||
return view('gallery.my', [
|
||||
'posts' => $posts_with_image,
|
||||
|
Reference in New Issue
Block a user