Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

surya454's avatar

Laravel 5 Database Migrate Help

I have installed Laravel 5 in Xampp Windows OS. I am getting CreateArticlesTable not found while roll back migration. Attached is the migrate screenshot details (No option in forum to add screenshots). Could you please help to fix the issue. Created Controller using php artisan make:controller ArticlesController.

0 likes
22 replies
mstnorris's avatar

@surya454 you can add images using the standard img tag (first upload the image to a service like http://imgur.com

From the sounds of things, either you changed your file name or, most likely is that you need to run

composer dump-autoload -o

constb's avatar

@surya454 something similar happened to me too. I don't remember exactly what caused this, but the only way out was to DROP every table from the database and recreate everything from scratch: php artisan migrate:install, php artisan migrate.

ps. Also if you are rolling migrations back only to rerun them again, there's php artisan migrate:refresh command that does exactly that.

mstnorris's avatar

@surya454 did you try composer dump-autoload -o ?

What happens when you manually delete all the tables (if you are able to do so, i.e. you're still developing and you're not losing production data). And then you run php artisan migrate, what happens then?

surya454's avatar

@mstnorris : I tried following steps and still same error:

  1. ran composer dump-autoload -o
  2. deleted tables
  3. re-run "php artisan migrate" works fine
  4. "php artisan migrate:rollback - Same error (CreateArticlesTable not found)
surya454's avatar

@constb : Still same error. I even tried with fresh Laravel install and getting same error

surya454's avatar
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration;

class CreateArticlesTable extends Migration {

/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Schema::create('articles', function(Blueprint $table)
    {
        $table->increments('id');
                    $table->string('text');
                    $table->text('body');
        $table->timestamps();
                    $table->timestamp('published_at');
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::drop('articles');
}

}

surya454's avatar

c:\xamppsurya\htdocs\laraveltest5>php artisan clear-compiled

c:\xamppsurya\htdocs\laraveltest5>php artisan migrate Migration table created successfully. Migrated: 2014_1012000000_create_users_table Migrated: 2014_1012_100000create_password_resets_table Migrated: 20150409_103922_create_articles_table

c:\xamppsurya\htdocs\laraveltest5>php artisan migrate:rollback

[Symfony\Component\Debug\Exception\FatalErrorException] Class 'CreateArticlesTable' not found

surya454's avatar

Log File: [2015-04-10 15:56:46] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'CreateArticlesTable' not found' in C:\xamppsurya\htdocs\laraveltest5\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php:301 Stack trace: #0 {main}

mstnorris's avatar

@surya454 your filename is different - this is what it is expecting

20150409_103922_create_articles_table

yet, in the screenshot you posted, the filename is different. Why is this? You have changed it.

surya454's avatar

Thank you all. It is nothing to do Laravel . Looks like my composer file is corrupted.

mstnorris's avatar

@surya454 by the looks of your first screen shot, I don't think your composer file was corrupted.

sargilla's avatar

Hi, same problem here, solved with "composer update"

2 likes
bach's avatar

I found the error resource. A very simple mistake. I had modified the migration file afterwards. I saved it. I did not run any migration, but then when I came back to rollback, I had forgotten that I added nullable functions for some columns that were not migrated originally.

misterk's avatar

I have the same problem with the exception

'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'CreateArticlesTable' not found' in

but now I have solved it by: 1-> go to 'migration table' in the database (mysql database in phpMyAdmin). 2-> delete the record of 'Article' column: if the error message is 'CreateArticlesTable', the record to delete must be ' create_article_table' in the 'migration table'

1 like
fortran's avatar

Deleting create_article_table record in the migrations table solved my problem. The prev post by @misterk should be accepted answer.

lifesound's avatar

If all things failed

Delete the migration file after copying the contents of it

the re make the migration with the same name

paste the contents inside

that solved my problem

Please or to participate in this conversation.