diff options
author | Chaoyi Zha <summermontreal@gmail.com> | 2017-03-18 00:00:13 +0300 |
---|---|---|
committer | Chaoyi Zha <summermontreal@gmail.com> | 2017-03-18 00:00:13 +0300 |
commit | 65794f83d72161bf6330ba04107035692d9ad261 (patch) | |
tree | 36b9d780614dcdce9a4b712bd34a682baa9bf093 /bootstrap | |
parent | 8f6d9762e98a418c7f3cfc416199b654c39319b0 (diff) |
Use ApiException to handle API errors and use ApiMiddleware to handle API authentication
Diffstat (limited to 'bootstrap')
-rw-r--r-- | bootstrap/app.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bootstrap/app.php b/bootstrap/app.php index ebf9dc2..6558119 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -61,12 +61,12 @@ $app->middleware([ // Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class, - App\Http\Middleware\VerifyCsrfToken::class + App\Http\Middleware\VerifyCsrfToken::class, ]); -// $app->routeMiddleware([ - -// ]); +$app->routeMiddleware([ + 'api' => App\Http\Middleware\ApiMiddleware::class, +]); /* |-------------------------------------------------------------------------- |