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

Generated UsersController contains static method calls to Confide #477

Closed
melv-n opened this issue Dec 13, 2014 · 1 comment
Closed

Generated UsersController contains static method calls to Confide #477

melv-n opened this issue Dec 13, 2014 · 1 comment

Comments

@melv-n
Copy link

melv-n commented Dec 13, 2014

I'm using version "zizaco/confide": "~4.0@dev" and ran the php artisan confide:controller command. Aside from having to fix references to my namespaces I see that all calls on the Confide class are made statically, e.g. Confide::logAttempt( ) But the Confide class doesn't even have any static methods, and thus the below error is thrown:

Non-static method Zizaco\Confide\Confide::logAttempt() should not be called statically, assuming $this from incompatible context

How can we fix this and still utilize the functions in Confide? Do we need to create an instance for this? Or should the methods be made static?

@melv-n
Copy link
Author

melv-n commented Dec 13, 2014

Found the issue. I had added this use statement in the top:

use Zizaco\Confide\Confide;

Which beat the Facade and auto-magic with the static classes.

My solution was to change all calls from Confide::method() to \Confide::method() to fix the errors thrown that it could not find the Confide class.

@melv-n melv-n closed this as completed Dec 13, 2014
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

1 participant