Route::post("article/{id}", [ActicleController::class, 'update')->name('article.update');
Route::post("article/{article}", [ArticleController::class, 'update')
->name('article.update');
class ArticleController extends Controller
{
public function update(Article $article, ArticleUpdateRequest $request)
{
$article
->fill($request->validated())
->save();
return redirect(route('article.edit', $article));
}
}