Answers for "create columns migration laravel"

PHP
27

add new column in laravel migration

php artisan make:migration add_paid_to_users_table --table=users
  
public function up()
{
    Schema::table('users', function($table) {
        $table->integer('paid');
    });
}

public function down()
{
    Schema::table('users', function($table) {
        $table->dropColumn('paid');
    });
}

php artisan migrate
Posted by: Guest on September-03-2020
1

create migration laravel

php artisan make:Model Product -m -c  --resource
Posted by: Guest on November-26-2020

Code answers related to "create columns migration laravel"

Browse Popular Code Answers by Language