Myvideo

Guest

Login

What in the world is a Facade

Uploaded By: Myvideo
3 views
0
0 votes
0

Laravel facades serve as “static proxies“ to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods. It's perfectly fine if you don't totally understand how facades work - just go with the flow and continue learning about Laravel. If reading is more your style, first check out the Facade documentation. The Facade classes have a __callStatic which first checks for the container binding ID by calling static::getFacadeAccessor() (see #facade-class-reference) and then uses that to get the real underlying class from the DI Container. Once that's complete, then calls the actual method wanted (i.e. __callStatic arg) (see #L347). Facade Documentation:

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later