CSRF on YAJRA datatable Laravel5.5 not working

前端 未结 3 1735
感情败类
感情败类 2021-01-24 08:20

I have this code where I needed to store in a variable so I display it in view, I\'ve tried different approach of packing the \"Form header\" and using CSRF is not working

3条回答
  •  星月不相逢
    2021-01-24 08:42

    You need to declare your action like this :

    Check this : https://laravel.com/docs/5.4/controllers#resource-controllers

    Maybe you will have to add the csrf_token to your form.

    or you can do with Blade Form https://laravelcollective.com/docs/5.0/html :

    {!! Form::open(array('url' => route('product.update', $details->id), 'method' => 'PUT') !!}
    
    
    {!! Form::close() !!}
    

    edit : You have to use PUT/PATCH method to your form (see the link about resource controllers)

提交回复
热议问题