Adds make:facade command to Laravel Artisan
eelcol/laravel-make-facade is a Laravel package for adds make:facade command to laravel artisan.
It currently has 2 GitHub stars and 5.785 downloads on Packagist (latest version 1.0.1).
Install it with composer require eelcol/laravel-make-facade.
Discover more Laravel packages by eelcol
or browse all Laravel packages to compare alternatives.
Last updated
Facades can be extremely helpful in Laravel. This package adds a simple command to the CLI to add an easy way to create a new facade.
Use the following command to create a new facade:
php artisan make:facade NameOfFacade
This command creates a file in the folder app/Facades. It also creates a new FacadeServiceProvider.php file and updates this file everytime a new Facade is created.
After creating the first facade, this FacadeServiceProvider should be added to the providers array in config/app.php.
If you want to create a facade called 'Facebook', run the following command:
php artisan make:facade Facebook
This command will perform the following tasks:
You still have to add the FacadeServiceProvider to config/app.php and check if the facade returns the correct class.
Require this package with composer.
composer require eelcol/laravel-make-facade
Laravel 5.5 and up uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
Eelcol\LaravelMakeFacade\MakeFacadeServiceProvider::class,