public function getAllByType($type, $page = 0) { $imgData = $this->imageRepo->getPaginatedByType($type, $page); return response()->json($imgData); }