DEV Community

Adekoyejo Akinhanmi
Adekoyejo Akinhanmi

Posted on

1 2

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.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay