| 1 | <?php | = | 1 | <?php |
| 2 | 2 | |||
| 3 | use Illuminate\Http\Request; | 3 | use Illuminate\Http\Request; | |
| -+ | 4 | use Illuminate\Support\Facades\Route; | ||
| 4 | = | 5 | ||
| 5 | /* | 6 | /* | |
| 6 | |-------------------------------------------------------------------------- | 7 | |-------------------------------------------------------------------------- | |
| 7 | | API Routes | 8 | | API Routes | |
| 8 | |-------------------------------------------------------------------------- | 9 | |-------------------------------------------------------------------------- | |
| 9 | | | 10 | | | |
| 10 | | Here is where you can register API routes for your application. These | 11 | | Here is where you can register API routes for your application. These | |
| 11 | | routes are loaded by the RouteServiceProvider within a group which | 12 | | routes are loaded by the RouteServiceProvider within a group which | |
| 12 | | is assigned the "api" middleware group. Enjoy building your API! | 13 | | is assigned the "api" middleware group. Enjoy building your API! | |
| 13 | | | 14 | | | |
| 14 | */ | 15 | */ | |
| 15 | 16 | |||
| 16 | Route::middleware('auth:api')->get('/user', function (Request $request) { | 17 | Route::middleware('auth:api')->get('/user', function (Request $request) { | |
| 17 | return $request->user(); | 18 | return $request->user(); | |
| 18 | }); | 19 | }); |