1
votes

I have migrate like this

public function up()
{
    Schema::create('permissions', function ($table) {
        $table->increments('id');
        $table->tinyInteger('value');
        $table->string('name', 50);
        $table->timestamps();
        $table->integer('techniciansgroup_id')->nullable()->unsigned();
        $table->foreign('techniciansgroup_id')->references('id')->on('techniciansgroups')->onDelete('cascade');
    });
}

public function down()
{
    Schema::drop('permissions');
}

When i use this command

php artisan migrate

The database create correctly
but when i use rollback command

php artisan migrate:rollback

show this error

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

1
Did you try to change anything in the DB or changed the files after running the migration?Mina Abadir
No i am not. when i create database with migrate work correctly but when i rollback the database error not class found show meparanoid
Do you have any model for this table?smartrahat

1 Answers

-1
votes

I delete the permissions migrate and delete database.
after that I make permissions migration and use php artisan migrate and finally

php artisan migrate:rollback 

work correctly.