PHP code example of morphable / simple-view

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

    

morphable / simple-view example snippets




/*
 * index.php
 */


use \Morphable\SimpleView;
use \Morphable\SimpleView\ViewNotFound;

$instance = new SimpleView(__DIR__ . '/views');

/*
you can add anything inside the array in the second parameter, for instance a helper class
there is no template language, just write however you want inside the views
keep in mind the variables you set are usable in the