diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index f7e9ff8..a76ac0f 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -38,7 +38,10 @@ class PublicController extends BaseController $gallery->html = $parser->parse($gallery->description); } - return response()->json(["data" => \App\Http\Resources\Gallery::collection(collect($galleries))]); + $g = collect($galleries); + $r = $g->forPage(1, 10); + + return response()->json(["data" => \App\Http\Resources\Gallery::collection($r)]); } public function listGalleriesView($name, Request $request) { $tenant = Tenant::query()->where("url", "=", $name)->firstOrFail();