Skip to content

Instantly share code, notes, and snippets.

@guinslym
Created January 9, 2014 08:40
Show Gist options
  • Save guinslym/8331197 to your computer and use it in GitHub Desktop.
Save guinslym/8331197 to your computer and use it in GitHub Desktop.
I,m gettingthis following error while running "php artisan migrate"
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('username');
$table->string('email')->unique();
$table->string('password');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
guinslym@ubuntu:/var/www/la-project/tuto$ php artisan migrate
PHP Fatal error: Cannot redeclare class CreateUsersTable in /var/www/la-project/tuto/app/database/migrations/2014_01_09_082357_create_users_table.php on line 37
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Cannot redeclare class CreateUsersTable","file":"\/var\/www\/la-project\/tuto\/app\/database\/migrations\/2014_01_09_082357_create_users_table.php","line":37}}{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Cannot redeclare class CreateUsersTable","file":"\/var\/www\/la-projecguinslym@ubuntu:/var/www/la-project/tuto$
@Linell
Copy link

Linell commented Jan 25, 2014

Did you ever resolve this problem? I am running into the exact same issue and can't figure out a way to solve it.

@pingustar
Copy link

same here, any idea on how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment