DEV Community

Adekoyejo Akinhanmi
Adekoyejo Akinhanmi

Posted on

How does Laravel make methods available?

I'm relatively new to laravel and I have found that you have access to certain methods in the controllers e.g. response(), auth(), view() etc. I'd like to know how it does that.

Thanks

Top comments (1)

Collapse
 
bgallagh3r profile image
Brian Gallagher

Best bet is to dig into the code yourself. But the basic answer is that they are helper methods that return objects either via the IoC container or use a factory to create the object.