PHP code example of antonchaikin / f3-blade

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

    

antonchaikin / f3-blade example snippets


use F3Blade\BladePlugin;

BladePlugin::setPaths(__DIR__ . '/resources/views', __DIR__ . '/resources/cache');
BladePlugin::addNamespace('app', __DIR__ . '/resources/custom');
BladePlugin::register();

$f3->blade('home', ['title' => 'Hello']);

/** @var \Base&\F3Blade\BladeAwareF3 $f3 */

namespace F3Blade;

/**
 * @method string blade(string $view, array $data = [], array $mergeData = [])
 */
interface BladeAwareF3 {}

resources/
├── views/
│   └── home.blade.php
└── cache/