How to use laravel migrate

for Laravel 5+: php artisan make:migration add_response_to_transfers_table --table=transfers public function up() { Schema::table('transfers', function($table) { $table->integer('response'); }); } and don't forget to add the rollback option: public function down() { Schema::table('transfers', function($table) { $table->dropColumn('response'); }); } Then you can run your migrations: php artisan migrate use $table->integer('paid')->after('whichever_column'); to add this field after specific column. transfers | deposits | withdrawals | transactions

Post a comment

0 Comments