Answers for "laravel migration insert all data from 1 table into other table"

PHP
2

insert rows in migrations laravel

public function up()
{
    // 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 March-18-2020
0

how add field to table by another migration in laravel

php artisan make:migration add_store_id_to_users_table --table=users
Posted by: Guest on August-04-2021

Code answers related to "laravel migration insert all data from 1 table into other table"

Browse Popular Code Answers by Language