更新时间:2021-10-16 22:14:56
由于使用了 api.php 文件,所以可以减少使用的组
Since you are using the file api.php, you can reduce the group you're using
(你也不需要使用)
<?php
Route::group(['prefix' => 'auth'], function ($router) {
Route::post('upload', 'FileController@upload');
});
正如你在 app/Providers/RouteServiceProvider.php@40 中看到的,它已经定义了
As you can see in app/Providers/RouteServiceProvider.php@40, it is already defined
// protected $namespace = 'App\\Http\\Controllers';
//...
$this->routes(function () {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
您是否将请求作为 POST 运行?
Did you run the request as POST ?
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Laravel
Symfony \组件\ HttpKernel \ Exception \ MethodNotAllowedHttpException没有消息Laravel 5.8和Ajax
不明白为什么我不断收到此错误:Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
Symfony \组件\ HttpKernel \ Exception \ MethodNotAllowedHttpException没有消息Laravel 5.5
Symfony\Component\HttpKernel\Exception\NotFoundHttpException - Laravel API