['api'], 'prefix' => 'api', ], function () { Route::group(['prefix' => 'auth'], function () { Route::post('login', [AuthController::class, 'login']); Route::post('register', [AuthController::class, 'register']); Route::post('login-by-sms', [AuthController::class, 'loginBySms']); Route::post('login-by-wxmini', [AuthController::class, 'loginByWxMini']); Route::post('wx-bind-phone', [AuthController::class, 'wxbindPhone']); Route::post('reset', [AuthController::class, 'reset']); Route::post('reset-pwd', [AuthController::class, 'resetPwd']); }); Route::group(['prefix' => 'user', 'middleware' => ['auth:api']], function () { Route::get('profile', [UserController::class, 'profile']); Route::put('profile', [UserController::class, 'update']); }); });