Laravel Unknown Column ‘updated_at’

I’ve just started with Laravel and I get the following error: Unknown column ‘updated_at’ insert into gebruikers (naam, wachtwoord, updated_at, created_at) I know the error is from the timestamp column when you migrate a table but I’m not using the updated_at field. I used to use it when I followed the Laravel tutorial but now … Read more

Laravel Migration Change to Make a Column Nullable

I created a migration with unsigned user_id. How can I edit user_id in a new migration to also make it nullable()? Schema::create(‘throttle’, function(Blueprint $table) { $table->increments(‘id’); // this needs to also be nullable, how should the next migration be? $table->integer(‘user_id’)->unsigned(); } 11 Answers 11

Laravel Add a new column to existing table in a migration

I can’t figure out how to add a new column to my existing database table using the Laravel framework. I tried to edit the migration file using… <?php public function up() { Schema::create(‘users’, function ($table) { $table->integer(“paid”); }); } In terminal, I execute php artisan migrate:install and migrate. How do I add new columns? 17 … Read more