PHP code example of avik / canvas

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

    

avik / canvas example snippets


$factory->share('app_name', 'Avik App');

$factory->composer('profile', function($data) {
    $data['user'] = User::current();
    return $data;
});

$factory->directive('datetime', function($expression) {
    return " echo ($expression)->format('Y-m-d H:i:s');