skip to Main Content

Laravel @csrf empty value

The result generated by @csrf in Blade <input type="hidden" name="_token" value=""> Also tried {!! csrf_field() !!} and {{ csrf_field() }} but still there is no value . I know this question is already asked Laravel CSRF value empty, but the…

VIEW QUESTION

Turn on CSRF protection for a group of GET routes in Laravel

I have the following group of GET routes on Laravel: Route::get('/location/get', 'Ajax@getProducts'); Route::get('/products/get', 'Ajax@getProducts'); Route::get('/schedule/get', 'Ajax@getProducts'); I want to protect those routes with the automatically generated CSRF token from Laravel. I have read some workarounds about overriding method: VerifyCsrfToken@isReading(...), but…

VIEW QUESTION
Back To Top
Search