1php artisan make:migration add_paid_to_users_table --table=users
2
3public function up()
4{
5 Schema::table('users', function($table) {
6 $table->integer('paid');
7 });
8}
9
10public function down()
11{
12 Schema::table('users', function($table) {
13 $table->dropColumn('paid');
14 });
15}
16
17php artisan migrate
1Schema::table('users', function ($table) {
2 $table->string('email')->after('id')->nullable();
3});
1php artisan make:migration create_users_table --create=users
2
3php artisan make:migration add_votes_to_users_table --table=users
1class AddProfileToUsers extends Migration
2{
3 /**
4 * Run the migrations.
5 *
6 * @return void
7 */
8 public function up()
9 {
10 Schema::table('users', function (Blueprint $table) {
11 $table->string('profile')->nullable();
12 });
13 }
14
15 /**
16 * Reverse the migrations.
17 *
18 * @return void
19 */
20 public function down()
21 {
22 Schema::table('shop_users', function (Blueprint $table) {
23 $table->dropColumn(['profile']);
24 });
25 }
26}