Marwelln
Marwelln

Reputation: 29413

How do I load models in Laravel?

How do I load them from a route, controller or app::before? Do I require the file or do Laravel have a function for it? I can't find any documents on this issue.

Upvotes: 2

Views: 2710

Answers (1)

Ochi
Ochi

Reputation: 1478

I don't know what are you exactly doing and where do you have problem - it should be as easy as Model::method() since everything in Laravel is autoloaded... also remember to dump autoloader from time to time with composer dump-autoload.

Upvotes: 1

Related Questions