Did you put this code inside the run function of your migration?
I copied your code and created a test migration, and it worked perfectly for me
<?php
use Illuminate\Database\Migrations\Migration;
class CreateTest extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function($table) {
$table->increments('id');
$table->string('name')->unique();
$table->string('value');
$table->enum('type', ['varchar', 'text', 'boolean'])->default('varchar');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings');
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community