entrust
entrust copied to clipboard
Method Zizaco\Entrust\MigrationCommand::handle() does not exist
how can I fix this problem
U see folder,This method already exits in MigrationCommand ,why handle() does not exist? @Endlife93 这个文件不是存在于那儿好好的吗?没有这个异常啊?你执行什么的时候发现的?
I thing the package on Composer is not update.
@Lscx
Composer上面的版本看起來不是最新版本,才會導致這個問題發生。
我前幾天使用了一次,將它加入Laravel 5.6的專案,我必須到 vendor 內去修改function名稱
才可以順利執行!
"zizaco/entrust": "^1.9"
@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 !
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 you should never make changes to vendor files to make things work.
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)