udpate
This commit is contained in:
@@ -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', '.*');
|
||||
Reference in New Issue
Block a user