Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zuijiu997 opened this issue Sep 3, 2017 · 25 comments
Closed

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

zuijiu997 opened this issue Sep 3, 2017 · 25 comments

Comments

@zuijiu997
Copy link

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

@dokicro
Copy link

dokicro commented Sep 4, 2017

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

@puneetchoudhary7
Copy link

Thanks a lot @dokicro. You save my day.

@THEMBOCHARLES
Copy link

Yes, It worked. Thank you

@erayaydin
Copy link

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

@Zizaco
Copy link
Owner

Zizaco commented Nov 13, 2017

Closed since #840 was merged

@diegocar448
Copy link

Funciona com a versão 5.5 do Laravel?

@faiverson
Copy link

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

@diegocar448
Copy link

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.

@faiverson
Copy link

faiverson commented Dec 6, 2017

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!

@diegocar448
Copy link

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

@faiverson
Copy link

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

@diegocar448
Copy link

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

@faiverson
Copy link

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.

@soubhikchatterjee
Copy link

Works like a charm...

@naveednasib
Copy link

pro yes its work (y)

@ecabrales
Copy link

thenks! helpful for fix this bug with fire method 👍

@karimsamir
Copy link

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

@viniciussvl
Copy link

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

@walfter
Copy link

walfter commented Sep 24, 2018

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

Thanks!=)

@vijaymee05
Copy link

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 👍
It works for me

@MuriungiPatrick
Copy link

MuriungiPatrick commented Jun 19, 2019

Checkout for this file inside zizaco folder. change the fire method to Handle. check below
 
fire-to-handle

@kumarrahul-rkv
Copy link

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, It worked for me.

@pcbimon
Copy link

pcbimon commented Jul 4, 2019

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

Worked ... Thanks 👍

@sdebarun
Copy link

The problem of calling handle method during the the migration file s creation still persists. Though the solution @dokicro provided worked. But this should be fixed or at least be mentioned in the documentation.

@alexeyp0708
Copy link

I confirm. The problem exists when installing "zizaco / entrust": "5.2.x-dev". If you change the version to "dev-master" and composer update, the problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests