Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel - what means Vanilla PHP [duplicate]

Tags:

php

laravel

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

like image 421
Artur Mamedov Avatar asked Apr 28 '16 10:04

Artur Mamedov


1 Answers

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!

like image 151
CmdrSharp Avatar answered Sep 29 '22 08:09

CmdrSharp