我立即收到错误我将路由组添加到以下组
<?php
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api) {
$api->post('auth/login', 'App\Api\V1\Controllers\AuthController@login');
$api->post('auth/signup', 'App\Api\V1\Controllers\AuthController@signup');
$api->post('auth/recovery', 'App\Api\V1\Controllers\AuthController@recovery');
$api->post('auth/reset', 'App\Api\V1\Controllers\AuthController@reset');
// example of protected route
$api->get('protected', ['middleware' => ['api.auth'], function () {
return \App\User::all();
}]);
// example of free route
$api->get('free', function() {
return \App\User::all();
});
$api->group(['middleware' => 'api.auth'], function ($api) {
$api->post('driver/store', 'App/Api/V1/Controllers/DriverController@store');
$api->post('driver', 'App/Api/V1/Controllers/DriverController@index');
});
});
如果我应该删除路由组,其他路由会起作用,我已经检查了控制器中的命名空间声明并且它是正确的,作曲家自动加载但没有一个对我有用。