Last active
August 29, 2015 14:05
-
-
Save bmadigan/d9ee520bf38aee1aa6d8 to your computer and use it in GitHub Desktop.
Receiving Error in Multi-Tenancy Tutorial (To Philip Brown)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi. | |
I was doing the Multi-tenant tutorial and for some reason I keep getting the same error | |
over and over no matter what I do. | |
I've redone the code several times and still get the error: | |
Target [Illuminate\Database\Eloquent\Model] is not instantiable. | |
Which I understand should have something to do with my ServiceProviders and | |
binding them via the app.php file. | |
I have added you as a contributor to a private repo I have created to look at the | |
code if that's okay. | |
I re-created your /test route if you wish to see how I'm trying to call the Repository. | |
Any help would be great, been getting this error for a few days and I'm out of thoughts. | |
Thanks |
Its because you don't have a service provider to inject an instance of the Student
model into the repository. Laravel's IoC container is trying to resolve an instance of the abstract Model
class.
Set up a service provider to bootstrap your repository and inject an instance of the Student
model and it will work.
Beautiful !!! Got it working!! Thanks!! I knew another set of eyes would help
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm completely stumped by it. I've gone through the code for days over and over and I can't figure it out. I was a second pair of eyes that really the codebase might help