我不明白为什么我在下面得到 405
$app->group(['prefix' => 'api/v1'], function($app)
{
$app->get('my','MyController@index');
$app->post('my','MyController@store');
});
post url 按预期工作,但是当我定义 get route 时,应用程序开始向我抛出 405 。
来电显示
in RoutesRequests.php line 596
at Application->handleDispatcherResponse(array(2, array('POST'))) in RoutesRequests.php line 533
at Application->Laravel\Lumen\Concerns\{closure}() in RoutesRequests.php line 781
at Application->sendThroughPipeline(array(), object(Closure)) in RoutesRequests.php line 534
at Application->dispatch(null) in RoutesRequests.php line 475
at Application->run() in index.php line 28
post url工作正常,只是get url抛出405 ...清除缓存,生成自动加载文件...不知道出了什么问题..
用新路由定义新控制器,它会抛出 404 ......我不认为它是一个路由问题,还有别的东西..