Laravel migration default value

Put the default value in single quote and it will work as intended. An example of migration:


$table->increments('id');
$table->string('name');
$table->string('url');
$table->string('country');
$table->tinyInteger('status')->default('1');
$table->timestamps();

Comments

Leave a Reply