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', '.*');