PHP code example of tinylara / tinyview

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

    

tinylara / tinyview example snippets


// VIEW_BASE_PATH
define('VIEW_BASE_PATH', __DIR__.'/app/views/');

// View Loader
class_alias('\TinyLara\TinyView\TinyView','View');

$view = View::make('home')->with('article',Article::first())
                          ->withTitle('TinyLara :-D')
                          ->withFooBar('foo_bar');
View::process($view);