This commit is contained in:
pbao9
2026-02-10 17:27:10 +07:00
parent 3ece85430c
commit a36802bd82
8 changed files with 208 additions and 126 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
use App\Models\Product;
Route::prefix('v1')->group(function () {
Route::get('get-list-product', function () {
return response()->json([
'error' => false,
'data' => Product::all()
]);
})->name('api.user.GetListProduct');
});
Route::any('{any}', function () {
return response()->json([
'error' => true,
'message' => 'API Route not found'
], 404);
})->where('any', '.*');