Answers for "laravel migration create column collate"

PHP
0

how add new column in larevel with migration

php artisan make:migration add_paid_to_users_table --table=users


public function up()
{
    Schema::table('users', function($table) {
        $table->integer('paid');
    });
}
and don't forget to add the rollback option:

public function down()
{
    Schema::table('users', function($table) {
        $table->dropColumn('paid');
    });
}
Posted by: Guest on January-14-2022

Code answers related to "laravel migration create column collate"

Browse Popular Code Answers by Language