PHP code example of litphp / view-plates

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

    

litphp / view-plates example snippets


Hello <?=$this->e($name)

$configuration += \Lit\View\Plates\PlatesView::configuration([
    __DIR__ . '/templates',
]);

abstract class BaseAction extends BoltAbstractAction
{
    use \Lit\View\Plates\PlatesViewBuilderTrait;

class HomeAction extends BaseAction
{
    protected function main(): ResponseInterface
    {
        return $this->plates('index')->render(['name' => '<plates>']);
    }