Shift Routes

Laravel 5.3 now stores Routes in a top-level `routes` folder and
separates them into API, console, and web files.
This commit is contained in:
Laravel Shift
2016-10-19 07:53:10 +00:00
parent c58d05f170
commit e7b419c4fc
3 changed files with 52 additions and 0 deletions
Executable
+18
View File
@@ -0,0 +1,18 @@
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::get('/user', function (Request $request) {
return $request->user();
})->middleware('auth:api');