Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

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');
	}

}

Last updated 2 years ago.
0

This is seeder not migration

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Albert221 albert221 Joined 13 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.