【问题标题】:Laravel 5.6 route updating formLaravel 5.6 路由更新表单
【发布时间】:2018-02-22 14:45:15
【问题描述】:
This is the mean problem
I have controllers structures like this 

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

Updating form is

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

i got this error 

Any Solution ?? 

【问题讨论】:

    标签: laravel laravel-5.6


    【解决方案1】:

    使用put方法:

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

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

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

    php artisan route:list
    

    【讨论】:

      猜你喜欢
      • 2019-07-10
      • 1970-01-01
      • 2019-03-31
      • 1970-01-01
      • 2018-08-01
      • 2018-09-26
      • 2018-09-28
      • 1970-01-01
      • 2017-01-27
      相关资源
      最近更新 更多