PHP code example of chez14 / f3-ilgar

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

    

chez14 / f3-ilgar example snippets


        \Chez14\Ilgar\Boot::now();
        

$this->f3->set('ILGAR.path', "new-folder/");

namespace Migration;

class Test01 extends \Chez14\Ilgar\MigrationPacket {
    public function on_migrate(){
        // Do your things here!
        // All the F3 object were loaded, F3 routines executed,
        // this will just like you doing things in your controller file.
        
        $f3 = \F3::instance(); //get the $f3 from here.
        
        echo "Hello from Test01 Migration package";
    }

    public function on_failed(\Exception $e) {

    }
}

$stats = [
    "success" => $counter, // how many migration executed
    "last_exception" => $failed, // last exception occured, this is an Exception object.
    "version" => $current // current version applied
];
bash
    php index.php /ilgar/migrate