Call to undefined function csrf_field()

2024-04-20 22:37:10 Sawan Laravel

Fixing undefined function csrf_field() In Laravel

Laravel's csrf_field() function is introduced in version 5.1 .

In versions below 5.1 for adding CRSF token please use below code in your forms.

<input type="hidden" name="_token" value="{{ csrf_token() }}">

This post is submitted by one of our members. You may submit a new post here.

Related Tricks