LaravelPackages.net
Acme Inc.
Toggle sidebar
prezire/facade-generator

An Artisan command that generates a Service Provider and Facade based on your existing custom Service class file.

30
0
About prezire/facade-generator

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

Facade Generator for Laravel 5.6

An Artisan command that generates a Service Provider and Facade based on your existing custom Service class file.


Installation

composer require prezire/facade-generator

Usage

php artisan make:facade [FacadeAliasName] [TargetServiceFile]

Example: Create a FooBar facade based on Foo service class file.

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,
],

Using the Facade.

Route::get('/', function () {
  return \FooBar::doSomething();
});

Star History Chart