PHP code example of xaamin / blade

1. Go to this page and download the library: Download xaamin/blade 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/ */

    

xaamin / blade example snippets


    use Xaamin\Blade\View;

    $view = new View('views', 'cache');

    echo $view->make('home', ['name' => 'John Doe']);

    $view->compiler()->directive('money', function ($expression) {
        return "<?= '$ ' . number_format($expression, 2, '.', ','); 

     $decimal = '520.50'