5

In the Laravel documentation, on route caption, at point where explain how to create csrf token, the doc says:

// Vanilla PHP
<?php echo csrf_field(); ?>

// Blade Template Syntax
{{ csrf_field() }}

What it mean for Vanilla PHP? Thank in advance! :)

Link to the doc https://laravel.com/docs/5.2/routing#csrf-protection

Artur Mamedov
  • 597
  • 1
  • 7
  • 17

1 Answers1

12

What it means is that you're echoing the method they've created in Vanilla PHP - thus, standard PHP. Below it, you'll see the {{ csrf_field() }} which is the Blade syntax provided with Laravel. It simply presents you with two ways to output the same thing - one in "Vanilla", and one with Blade!

CmdrSharp
  • 1,085
  • 13
  • 30