PHP code example of robertboloc / robo-phinx

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

    

robertboloc / robo-phinx example snippets




class Robofile extends \Robo\Tasks
{
    use \Rb\Robo\Task\Phinx;
    
    //...
}



$this->taskPhinx()
     ->init($path = '.')
     ->run();



$this->taskPhinx()
     ->create($migration)
     ->run();



$this->taskPhinx()
     ->migrate($target = null)
     ->run();



$this->taskPhinx()
     ->rollback($target = null)
     ->run();



$this->taskPhinx()
     ->status()
     ->run();



$this->taskPhinx()
     ->config($file = 'phinx.yml')
     ->status()
     ->run();



$this->taskPhinx()
     ->parser($format = 'yaml')
     ->status()
     ->run();



$this->taskPhinx()
     ->environment($environment = 'development')
     ->status()
     ->run();