這就是我的代碼的樣子路線:Route::put('/articles/{$article}', 'ArticlesController@update');控制器: public function update($id){ $article=Article::find($id); $article ->title = request('title'); $article->excerpt=request('excerpt'); $article->body=request('body'); $article->save(); return redirect('/articles/'. $article->id); }刀刃: <form method="POST" action="/articles/{{$article->id}}" > @csrf @method('PUT')每次我嘗試提交更新時,我都會收到以下信息:The PATCH method is not supported for this route. Supported methods: GET, HEAD.我目前被困在這一點上。
嘗試執行更新方法時,路由不支持 PUT 方法
寶慕林4294392
2023-10-21 16:29:16