add pagination to my packages

This commit is contained in:
Moradi
2025-04-09 13:15:11 +03:30
parent 62a353ef80
commit 4492db15cf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ class PackageController extends Controller
}); });
} }
$Packages = $Packages->orderByDesc('id')->get(); $Packages = $Packages->orderByDesc('id')->paginate(10);
return PackageResource::collection($Packages); return PackageResource::collection($Packages);
} }
+1 -1
View File
@@ -8,7 +8,7 @@ const urls = {
}, },
showPackage: function(id) { showPackage: function(id) {
return `/ShowPackage/${id}`; return `/api/show-package/${id}`;
}, },
showLabel: function(id) { showLabel: function(id) {
return `/ShowLabel/${id}`; return `/ShowLabel/${id}`;