Logo

Miscellaneous Functions

abort abort_if abort_unless app auth back bcrypt blank broadcast cache class_uses_recursive collect config cookie csrf_field csrf_token dd dispatch dump env event filled info logger method_field now old optional policy redirect report request rescue resolve response retry session tap throw_if throw_unless today trait_uses_recursive transform validator value view with

csrf_token

Logo laravel/framework laravel/framework
The csrf_token function retrieves the value of the current CSRF token:
<?php $token = csrf_token();
<?php     function csrf_field()

    {

        return new HtmlString('<input type="hidden" name="_token" value="'.csrf_token().'" autocomplete="off">');

    }

}
src/Illuminate/Foundation/helpers.php