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

Tweak default files.

parent eedac025
......@@ -68,7 +68,9 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes()
{
Route::group([
'namespace' => $this->namespace, 'middleware' => 'api',
'middleware' => ['api', 'auth:api'],
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
......
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
......@@ -11,9 +13,6 @@
|
*/
Route::group([
'prefix' => 'api',
'middleware' => 'auth:api',
], function () {
//
Route::get('/user', function (Request $request) {
return $request->user();
});
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