这种报错通常意味着您正在尝试使用 GET 方法访问一个只支持 POST 方法的路由您的客户端发送了 GET 请求,但服务器端的路由定义只允许 POST 请求 在Laravel 的路由文件 routes/web.php 中 // 如果需要支持 GET 方法,可以改为: Route::match (['get', 'post'], '/your-route', 'YourController@yourMethod')...
Laravel提示The GET method is not supported for this route. Supported methods: POST.错误,其实很简单就是配置路由的时候设置的是post,但是访问时采用的是get方式。 解决办法1:将路由改为any或者get Route::any('index', 'IndexController@index); 解决方法2:将请求方式改为post ...
The last validation option for the GET request variables can be done in the routes file, when defining the routes. We can chain the route with the where method and use regular expressions. For example, if we want to get a User in such a way: Route::get('/user/{id}', function (int...
使用Laravel 8 版本进行文件系统上传时,获取文件大小报错,错误信息为:Method getClientSize() does not exist,经检查是版本问题。 因为getClientSize() 在 symfony 4.1 版本被移除了,改成了 getSize() 方法。 相应的,Laravel 5.7 之后的版本使用的都是 symfony 4.1 + ,因此也应该使用 getSize() 方法来替代 ge...
所以我建议你必须阅读laravel文档并练习MVC方法。你的Laravel代码很好,但你的JS代码有问题。你忘记在post...
您可以简单地将路由和表单方法更改为POST。它会正常工作,因为您是定义路线而不使用资源组的人。 就我而言,这是由于链接中的-。 我的链接是 sale/change-satus 然后当我提交form和method="POST"时,它被转换为GET(我不知道为什么)身体是空的。 我的解决方案是像这样重命名网址 ...
我正在Laravel做一份报名表。当我使用Route::post()并在我的控制器中生成这个函数时,它给了我一个错误。 and Route::post('/userregister',[Logincontroller::class,'userregister']); 这是我的函数userregister public function userregister(Request $request) { echo 'value posted'; } 发布于 7 月前...
Laravel提示The GET method is not supported for this route. Supported methods: POST.错误的解决办法 解决方法:将路由改为any() Route::any('index',[AdminIndexController::class,'index']);
Route::post('/delete', [DashboardController::class, 'delete'])->name('dashboard.delete'); }); 以及功能 public function delete(){ $user = \User::find(Auth::user()->id); Auth::logout(); if ($user->delete()) { return Redirect::route('/')->with('global', 'Your account has...
("字符集")可以指定解码方式,其实是不可以的,看 servlet的官方API说明有对此方法的解 释:Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader(). 可以看出对于get方法他是无能为...