An Artisan command that generates a Service Provider and Facade based on your existing custom Service class file.
prezire/facade-generator is a Laravel package for an artisan command that generates a service provider and facade based on your existing custom service class file..
It currently has 0 GitHub stars and 30 downloads on Packagist.
Install it with composer require prezire/facade-generator.
Discover more Laravel packages by prezire
or browse all Laravel packages to compare alternatives.
Last updated
An Artisan command that generates a Service Provider and Facade based on your existing custom Service class file.
composer require prezire/facade-generator
php artisan make:facade [FacadeAliasName] [TargetServiceFile]
php artisan make:facade FooBar \\App\\Services\\Foo
You must register the generated provider and alias for the facade in `config/app.php' file.
'providers' => [
App\Providers\Facades\FooBarServiceProvider::class,
],
'aliases' => [
'FooBar' => App\Facades\FooBar::class,
],
Route::get('/', function () {
return \FooBar::doSomething();
});