PHP code example of ganeshk007 / migration-generator

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

    

ganeshk007 / migration-generator example snippets


return [

    // List of tables to exclude (e.g. Laravel system tables)
    'exclude_tables' => [
        'jobs',
        'failed_jobs',
        'password_resets',
        'oauth*'
    ],
];

Schema::create('users', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('email')->unique();
    $table->timestamp('email_verified_at')->nullable();
    $table->string('password');
    $table->rememberToken();
    $table->timestamps();
});
bash
php artisan vendor:publish --tag=config

config/migration-generator.php
bash
php artisan migration:generate {table?}
bash
php artisan migration:generate
php artisan migration:generate users