5.3 api.php要怎么样写

Route::group(['middleware' => ['auth:api']], function () {
    Route::get('/test', function (Request $request) {
        return response()->json(['name' => 'test']);
    });
});

我这样子写不对的,访问不了
/test

JellyBool
修改的评论也不能少于六个字哦!