update: add v2 api

This commit is contained in:
v2board
2023-06-13 18:49:40 +08:00
parent 5ee58f32ca
commit 98bee6fa87
4 changed files with 123 additions and 69 deletions

View File

@ -76,5 +76,16 @@ class RouteServiceProvider extends ServiceProvider
$this->app->make('App\\Http\\Routes\\V1\\' . basename($file, '.php'))->map($router);
}
});
Route::group([
'prefix' => '/api/v2',
'middleware' => 'api',
'namespace' => $this->namespace
], function ($router) {
foreach (glob(app_path('Http//Routes//V2') . '/*.php') as $file) {
$this->app->make('App\\Http\\Routes\\V2\\' . basename($file, '.php'))->map($router);
}
});
}
}