csrf_field

The csrf_field function generates an HTML hidden input field containing the value of the CSRF token. For example, using Blade syntax:
<?php {{ csrf_field() }}
<?php         $additionalAttrs = $this->renderAttributesFromParams(array_merge(['method', 'action'], $knownTagParams));



        $html = collect(['<form', $defaultAttrs, $additionalAttrs])->filter()->implode(' ').'>';

        $html .= csrf_field();



        $method = strtoupper($method);
<?php             'environment' => app()->environment(),

            'xml_header' => '<?xml version="1.0" encoding="utf-8" ?>', // @TODO remove and document new best practice

            'csrf_token' => csrf_token(),

            'csrf_field' => csrf_field(),

            'config' => config()->all(),

            'response_code' => 200,
<?php             $this->assertEquals(app()->environment(), $cascade['environment']);

            $this->assertEquals('<?xml version="1.0" encoding="utf-8" ?>', $cascade['xml_header']);

            $this->assertEquals(csrf_token(), $cascade['csrf_token']);

            $this->assertEquals(csrf_field(), $cascade['csrf_field']);

            $this->assertEquals(config()->all(), $cascade['config']);