November 20, 2016 —John Koster
app($make = null, $parameters = [])
The app
function provides access to the Illuminate\Container\Container
instance. Because Container
is a singleton, any call to app()
will return the same Container
instance.
The app
function can also be used to resolve registered dependencies from the Container
instance. For example, to return an instance of the Illuminate\Auth\AuthManager
class (the class behind the Auth
facade), invoke app
with the auth
argument:
1<?php2 3// $authManager will be an instance of4// Illuminate\Auth\AuthManager5$authManager = app('auth');
∎
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.