Initial moves to new API scheme.

Implements a better middleware for handling API authentication, as well
as cleaner route handling.
This commit is contained in:
Dane Everitt 2017-04-02 00:11:52 -04:00
parent 55bf26e518
commit 87530cdc01
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
20 changed files with 706 additions and 572 deletions

View file

@ -33,6 +33,14 @@ 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(['web', 'auth', 'csrf'])
->namespace($this->namespace . '\Base')
->group(base_path('routes/base.php'));