Laravel 5.6路由更新表

问题描述 投票:2回答:1
This is the mean problem
I have controllers structures like this 

File Structures

And i am using this syntax to make routes which is worked good for me

web/routes

Updating form is

{{Form :: open(array('method'=>'POST','route'=> ['categories.update',$ category-> id]))}}

i got this error 

Error

Any Solution ?? 
laravel laravel-5.6
1个回答
2
投票

使用put方法:

{{ Form::open(array('method'=>'PUT','route' => ['categories.update', $category->id])) }}

因为Route::resource()PUT方法创建update路线。

您可以使用以下命令查看所有已注册的路由及其HTTP谓词和路由名称:

php artisan route:list
© www.soinside.com 2019 - 2024. All rights reserved.