add column in laravel migration
php artisan make:migration add_paid_to_users_table --table=usersphp artisan make:migration add_votes_to_users_table --table=users
php artisan make:migration create_users_table --create=usersphp 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 migrateSchema::table('users', function ($table) {
$table->string('email')->after('id')->nullable();
});Schema::table('users', function($table) {
$table->string("title");
$table->text("description");
$table->timestamps();
});php artisan migrate