Commit 8f66f4b6 authored by Taylor Otwell's avatar Taylor Otwell

Tweak default files.

parent eedac025
...@@ -68,7 +68,9 @@ class RouteServiceProvider extends ServiceProvider ...@@ -68,7 +68,9 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes() protected function mapApiRoutes()
{ {
Route::group([ Route::group([
'namespace' => $this->namespace, 'middleware' => 'api', 'middleware' => ['api', 'auth:api'],
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) { ], function ($router) {
require base_path('routes/api.php'); require base_path('routes/api.php');
}); });
......
<?php <?php
use Illuminate\Http\Request;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| API Routes | API Routes
...@@ -11,9 +13,6 @@ ...@@ -11,9 +13,6 @@
| |
*/ */
Route::group([ Route::get('/user', function (Request $request) {
'prefix' => 'api', return $request->user();
'middleware' => 'auth:api',
], function () {
//
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment