Support the ongoing development of →
Requests Views Architecture
Last updated 2 years ago.

Take a look at this page and familiarize yourself with the Laravel IoC container: What you're describing is a singleton, so read that section carefully. You could then reference it from the application facade or using dependency injection in a controller constructor.

When you create an Eloquent model it will look for the plural form of the class name so if the class is named 'Instagram' then it will look for a table named 'instagrams' in your database. I don't know off the top of my head if it will throw an error if the model class isn't being used in any other code. You can specify the name of the table by adding a protected property named 'table' (see

Last updated 2 years ago.

Sign in to participate in this thread!


Your banner here too?

raphadko raphadko Joined 13 Jul 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.