Add new API middleware
This commit is contained in:
parent
47e14ccaae
commit
45a153427e
5 changed files with 144 additions and 19 deletions
|
@ -29,13 +29,9 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function map()
|
||||
{
|
||||
Route::middleware(['api'])->prefix('/api/user')
|
||||
->namespace($this->namespace . '\API\User')
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware(['api'])->prefix('/api/admin')
|
||||
->namespace($this->namespace . '\API\Admin')
|
||||
->group(base_path('routes/api-admin.php'));
|
||||
// Route::middleware(['api'])->prefix('/api/user')
|
||||
// ->namespace($this->namespace . '\API\User')
|
||||
// ->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware(['web', 'auth', 'csrf'])
|
||||
->namespace($this->namespace . '\Base')
|
||||
|
@ -53,6 +49,10 @@ class RouteServiceProvider extends ServiceProvider
|
|||
->namespace($this->namespace . '\Server')
|
||||
->group(base_path('routes/server.php'));
|
||||
|
||||
Route::middleware(['api'])->prefix('/api/admin')
|
||||
->namespace($this->namespace . '\API\Admin')
|
||||
->group(base_path('routes/api-admin.php'));
|
||||
|
||||
Route::middleware(['daemon'])->prefix('/api/remote')
|
||||
->namespace($this->namespace . '\API\Remote')
|
||||
->group(base_path('routes/api-remote.php'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue