PHP code example of dotari / php-app

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

    

dotari / php-app example snippets


return new class {
    public function up($db) {
        $db->query("CREATE TABLE ...");
    }

    public function down($db) {
        $db->query("DROP TABLE ...");
    }
};
bash
php migrate.php migrate   # apply pending migrations
php migrate.php rollback  # undo the last migration
php migrate.php status    # show applied and pending migrations