PHP code example of ziming / laravel-specific-migrate-fresh

1. Go to this page and download the library: Download ziming/laravel-specific-migrate-fresh 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/ */

    

ziming / laravel-specific-migrate-fresh example snippets


return [

    /*
     * There are 2 modes 'exclude' and ' the tables you specified in the 'excluded_tables' array.
     * '.
     *
     * If mode is 'exclude', the database tables in this array will be excluded
     * from getting dropped.
     */
    'excluded_tables' => [
        //
    ],

    /*
     * This will be used if mode is '



use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('some_giant_table_i_do_not_want_to_drop')) {
            return;
        }

        Schema::create('some_giant_table_i_do_not_want_to_drop', function (Blueprint $table) {
            $table->id();
            // Other columns
        }
}
bash
php artisan migrate:specific-fresh --seed
bash
php artisan migrate:specific-fresh