PHP code example of phpnomad / update

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

    

phpnomad / update example snippets




namespace MyApp\Upgrades;

use PHPNomad\Update\Interfaces\UpgradeRoutine;

class InstallWidgetsTable implements UpgradeRoutine
{
    public static function getTargetVersion(): string
    {
        return '1.2.0';
    }

    public function up(): void
    {
        // Install or migrate your 1.2.0 schema here.
    }
}