From f49cc60f9a156c70fc78484c67512e40467806ca Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Sun, 5 Mar 2023 20:42:09 +0600 Subject: [PATCH] Renamed route api to route api v1. --- app/Providers/RouteServiceProvider.php | 4 ++-- routes/{api.php => api-v1.php} | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) rename routes/{api.php => api-v1.php} (80%) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index bc49109..63b9098 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -28,8 +28,8 @@ class RouteServiceProvider extends ServiceProvider $this->routes(function () { Route::middleware('api') - ->prefix('api') - ->group(base_path('routes/api.php')); + ->prefix('api/v1') + ->group(base_path('routes/api-v1.php')); Route::middleware('web') ->group(base_path('routes/web.php')); diff --git a/routes/api.php b/routes/api-v1.php similarity index 80% rename from routes/api.php rename to routes/api-v1.php index 889937e..fa84410 100644 --- a/routes/api.php +++ b/routes/api-v1.php @@ -13,7 +13,3 @@ use Illuminate\Support\Facades\Route; | be assigned to the "api" middleware group. Make something great! | */ - -Route::middleware('auth:sanctum')->get('/user', function (Request $request) { - return $request->user(); -});