PHP code example of soy-php / phinx-task
1. Go to this page and download the library: Download soy-php/phinx-task 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/ */
soy-php / phinx-task example snippets
$recipe = new \Soy\Recipe();
$recipe->prepare(\Soy\Phinx\Config::class, function (\Soy\Phinx\Config $phinxConfig) {
return $phinxConfig
->setBinary('./vendor/bin/phinx')
->setConfigurationFile('app/config/phinx.yml');
});
$recipe->component('default', function (\Soy\Phinx\MigrateTask $phinxMigrateTask) {
$phinxMigrateTask
->setVerbose(true)
->run();
});
return $recipe;