antonioribeiro / support

Support Classes
BSD 3-Clause "New" or "Revised" License
59 stars 49 forks source link

csrf_token helper method in Laravel 5.4 has been updated #10

Closed bryandease closed 7 years ago

bryandease commented 7 years ago

if ( ! function_exists( 'csrf_token' )) { function csrf_token() { return app()->make('session.store')->getToken(); } }

should now be:

if ( ! function_exists( 'csrf_token' )) { function csrf_token() { return app()->make('session')->token(); } }

antonioribeiro commented 7 years ago

Should be fixed now. There is no need to create a csrf_token on any Laravel 5, this was a Laravel 4 thing.