Some migration files come up as missing:
From term after php artisan migrate:refresh --seed
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'CreatePermissionUserTable' not found
The file does exists and is called 2015_02_17_152439_create_permission_user_table
inside the file:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePermissionUserTable extends Migration {
public function up()
{
Schema::create('permission_user', function (Blueprint $table) {
$table->increments('id');
$table->integer('permission_id')->unsigned()->index();
$table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');
$table->integer('user_id')->unsigned()->index();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_user');
}
}
This file is auto generated by kodeine/laravel-acl
At first I thought this was an issue with the auto generated file, but after skipping the refresh and just deleting the tables from the db by hand I realized the issue also came up with other files
We can work around this for now, but we need to fix it somehow, please help!
composer.json
... "classmap": [ "database/" ] ...
$ composer dump -o
?
That helped me too with a similar problem with a auto generated file by Xethron/migrations-generator.
The error was:
[Symfony\Component\Debug\Exception\FatalThrowableError] Fatal error: Class 'AddForeignKeysToXTable' not found
And your solution solved my problem.
I let the error here to help people find it if they have the same problem.
Yes, thank you. composer dump-autoload
worked like a charm.
Although I did want to ask, if it's possible at all to automate this operation.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community