PHP code example of arindam / blade-variable

1. Go to this page and download the library: Download arindam/blade-variable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arindam / blade-variable example snippets


Arindam\BladeVariable\BladeVariableServiceProvider::class,

//declare it
@var('myname', 'Arindam')

//use it
<h1>{{ $myname }}</h1>

//declare it
@var('myAge', 36)

//use it
<p>Age is : {{ $myAge }}</p>