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

Call to a member function getConnection() on null in Capsule/Manager #11235

Closed
CupOfTea696 opened this issue Dec 7, 2015 · 3 comments
Closed

Comments

@CupOfTea696
Copy link
Contributor

When using the Capsule Manager from illuminate/database I get the error Call to a member function getConnection() on null in Capsule/Manager

I quickly checked the file, and the $instance variable is never actually set.

See: https://github.com/illuminate/database/blob/master/Capsule/Manager.php#L74

@GrahamCampbell
Copy link
Member

You need to set it. ;)

@CupOfTea696
Copy link
Contributor Author

Ooh you need to setAsGlobal method, I see now :p

@extsalt
Copy link

extsalt commented Aug 8, 2019

$capsule->setAsGlobal();

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

3 participants