diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 28fccd6..66fc05e 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -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(); diff --git a/app/Http/Controllers/ImageController.php b/app/Http/Controllers/ImageController.php index 1d97c85..44ad80b 100644 --- a/app/Http/Controllers/ImageController.php +++ b/app/Http/Controllers/ImageController.php @@ -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, diff --git a/resources/views/gallery/my.blade.php b/resources/views/gallery/my.blade.php index 5f0fca1..fe22ae5 100644 --- a/resources/views/gallery/my.blade.php +++ b/resources/views/gallery/my.blade.php @@ -28,6 +28,9 @@ @endforeach +