Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cydrobolt/polr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaoyi Zha <summermontreal@gmail.com>2017-03-18 00:00:13 +0300
committerChaoyi Zha <summermontreal@gmail.com>2017-03-18 00:00:13 +0300
commit65794f83d72161bf6330ba04107035692d9ad261 (patch)
tree36b9d780614dcdce9a4b712bd34a682baa9bf093 /bootstrap
parent8f6d9762e98a418c7f3cfc416199b654c39319b0 (diff)
Use ApiException to handle API errors and use ApiMiddleware to handle API authentication
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/app.php8
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,
+]);
/*
|--------------------------------------------------------------------------