PHP code example of kesty / view

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

    

kesty / view example snippets


// Make sure you have composer included
 new Lara\View('/path/to/my/views');

// Next you will probably want to make the view object global.
$views->globalise();

echo View::make('greeting', array('name' => 'Mike'));

<!-- View stored in /path/to/my/views/greeting.php -->

<html>
    <body>
        <h1>Hello,  echo $name; 

$views = new Lara\View(['/views/specific', '/views/generic']);