PHP code example of effectra / renova

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

    

effectra / renova example snippets


use Effectra\Renova\TemplateEngine;

$template = new TemplateEngine();

// Render a template file
$content = (new Render(
    $path,
    $data,
    [
        ['url' => function ($path = '') {
                return Request::url() . (string) $path;
            }]
    ],
    [
        ['APP_NAME' => $_ENV['APP_NAME'] ]
    ],
    $this->reader
))->send();

$links = $this->encore->linkTags('app');
$scripts = $this->encore->scriptTags('app');

$content = $this->addLinksAndScripts($content, $links, $scripts);

use Effectra\Renova\WebEncore;

$webEncore = new WebEncore();

// Generate script tags for a specific section
$scriptTags = $webEncore->scriptTags('app');

// Generate link tags for a specific section
$linkTags = $webEncore->linkTags('styles');