entrust icon indicating copy to clipboard operation
entrust copied to clipboard

Method Zizaco\Entrust\MigrationCommand::handle() does not exist

Open Endlife93 opened this issue 6 years ago • 8 comments

how can I fix this problem

Endlife93 avatar Aug 16 '18 05:08 Endlife93

U see folder,This method already exits in MigrationCommand ,why handle() does not exist? @Endlife93 这个文件不是存在于那儿好好的吗?没有这个异常啊?你执行什么的时候发现的?

Lscx avatar Aug 23 '18 04:08 Lscx

I thing the package on Composer is not update. @Lscx Composer上面的版本看起來不是最新版本,才會導致這個問題發生。 我前幾天使用了一次,將它加入Laravel 5.6的專案,我必須到 vendor 內去修改function名稱 才可以順利執行! default

ernestsu2520 avatar Sep 01 '18 18:09 ernestsu2520

"zizaco/entrust": "^1.9"

Clago avatar Sep 04 '18 02:09 Clago

@Clago Thank you. :) I always use "zizaco/entrust": "5.2.x-dev" in my project. I will try the version "zizaco/entrust": "^1.9" last time !

ernestsu2520 avatar Sep 04 '18 02:09 ernestsu2520

Error Method Zizaco\Entrust\MigrationCommand::handle() does not exist

  • Go to the file (vendor-> zizaco-> entrust-> src-> commands-> MigrationCommand.php) and change the "fire" method to "handle" and after the command "php artisan entrust: migration" will be generated Migration and just run the "php artisan migrate" command that the tables will be generated in your database.

toanlv92 avatar Sep 21 '18 01:09 toanlv92

@toanlv92 you should never make changes to vendor files to make things work.

Gertiozuni avatar Sep 27 '18 09:09 Gertiozuni

It doesn't work with 5.2.x-dev when I tried php artisan entrust:migration in Laravel 5.7.*, so I have added this function

public function handle() {
    $this->fire();
}

to (vendor-> zizaco-> entrust-> src-> commands-> MigrationCommand.php)

karimsamir avatar Nov 27 '18 21:11 karimsamir