entrust icon indicating copy to clipboard operation
entrust copied to clipboard

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

Open zuijiu997 opened this issue 9 years ago • 25 comments

php artisan entrust:migration throw this ReflectionException Method Zizaco\Entrust\MigrationCommand::handle() does not exist

zuijiu997 avatar Sep 03 '17 13:09 zuijiu997

I found solution by @justem007 take a look here: https://github.com/Zizaco/entrust/issues/826

"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."

dokicro avatar Sep 04 '17 12:09 dokicro

Thanks a lot @dokicro. You save my day.

puneetchoudhary7 avatar Sep 10 '17 11:09 puneetchoudhary7

Yes, It worked. Thank you

THEMBOCHARLES avatar Oct 02 '17 10:10 THEMBOCHARLES

This should be created PR and merged with new tag for Laravel 5.5 Support

erayaydin avatar Oct 04 '17 00:10 erayaydin

Closed since #840 was merged

Zizaco avatar Nov 13 '17 22:11 Zizaco

Funciona com a versão 5.5 do Laravel?

diegocar448 avatar Dec 06 '17 12:12 diegocar448

Yes, it works! You can use "zizaco/entrust": "dev-master" instead

faiverson avatar Dec 06 '17 15:12 faiverson

Do you have any tutorials to help me set up? Because following the doc I'm having errors the structure changes laravel 5.4 changes a little getting different from the documentation.

diegocar448 avatar Dec 06 '17 16:12 diegocar448

I don't have a tutorial. I'd suggest to try in a clean laravel 5.5 so you can see if the problem is the package or you are having other problems. What you need to do is: Add "zizaco/entrust": "dev-master" and run composer update You don't need to add nothing in app.php in laravel 5.5 Then run vendor:publish and select the package Once the config file is added, you can run php artisan entrust:migration and the the migrations. Make sure that you User, Role and Permission models are fine and the namespace/path are correct in the config file.

Hope this help!

faiverson avatar Dec 06 '17 16:12 faiverson

It is possible to have the same ACL result using Middleware? I had done a long ago doing so, would the ACL have any more advantage than Middleware?

https://github.com/diegocar448/CodeDelivery/blob/master/app/Http/routes.php

diegocar448 avatar Dec 06 '17 19:12 diegocar448

Not sure what you are asking. What is ACL for you? What are you trying to compare? Please be more explanatory.

faiverson avatar Dec 06 '17 20:12 faiverson

I talked about access level, when we separated accessibility, responsibilities, administrator levels, clients, user ..... does not ACL do that too?

diegocar448 avatar Dec 07 '17 03:12 diegocar448

There are different ways to handle accessibility and responsibilities, it will depend on you and your project. You can cover accessibility with Gates and Policies for example. This package provides you a way to handle roles and permissions in views and you are extending the models to easy assign/attach and remove/deattach permissions and roles. It is not better or worse, it depends on you and your taste.

faiverson avatar Dec 07 '17 03:12 faiverson

Works like a charm...

soubhikchatterjee avatar Feb 26 '18 09:02 soubhikchatterjee

pro yes its work (y)

naveednasib avatar Apr 25 '18 05:04 naveednasib

thenks! helpful for fix this bug with fire method :+1:

ecabrales avatar Jul 19 '18 22:07 ecabrales

The error still exists after install it using composer require zizaco/entrust:5.2.x-dev

karimsamir avatar Sep 12 '18 08:09 karimsamir

I found solution by @justem007 take a look here: #826

"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."

thaaaaaaaaaanks

viniciussvl avatar Sep 13 '18 16:09 viniciussvl

The error still exists after install it using composer require zizaco/entrust:5.2.x-dev

Thanks!=)

walfter avatar Sep 24 '18 18:09 walfter

I found solution by @justem007 take a look here: #826

"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."

Thanks a ton :+1: It works for me

vijaymee05 avatar Feb 09 '19 09:02 vijaymee05