Add new API middleware

This commit is contained in:
Dane Everitt 2017-11-19 14:05:13 -06:00
parent 47e14ccaae
commit 45a153427e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 144 additions and 19 deletions

View file

@ -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'));