in Laravel

How To Create A Facade In Laravel

In this tutorial we're going to learn how to use and create your own Laravel facades.

What Is A Facade?

A facade provides a static way of accessing the Laravel service container. The service container allows you to instaniate classes via an alias. You can access the service container by using the app() or resolve() helper functions, passing in the alias for the class you want to return.

$client = app('api-client');

You c

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email