Answers for "how to add some rows in database when migration"

0

how to add some rows in database when migration

// Create the table
    Schema::create('users', function($table){
        $table->increments('id');
        $table->string('email', 255);
        $table->string('password', 64);
        $table->boolean('verified');
        $table->string('token', 255);
        $table->timestamps();
    });

    // Insert some stuff
    DB::table('users')->insert(
        array(
            'email' => '[email protected]',
            'verified' => true
        )
    );
Posted by: Guest on December-15-2020

Code answers related to "how to add some rows in database when migration"

Browse Popular Code Answers by Language