Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunaoka/laravel-facade-generator
Facade generator for Laravel 5.8 to 11.x
https://github.com/sunaoka/laravel-facade-generator
artisan generator laravel laravel-package laravel10 laravel11 laravel5 laravel6 laravel7 laravel8 laravel9 php php7 php8 php81 php82
Last synced: 3 months ago
JSON representation
Facade generator for Laravel 5.8 to 11.x
- Host: GitHub
- URL: https://github.com/sunaoka/laravel-facade-generator
- Owner: sunaoka
- License: mit
- Created: 2019-01-15T06:20:49.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-07T01:06:21.000Z (3 months ago)
- Last Synced: 2024-10-07T01:49:08.532Z (3 months ago)
- Topics: artisan, generator, laravel, laravel-package, laravel10, laravel11, laravel5, laravel6, laravel7, laravel8, laravel9, php, php7, php8, php81, php82
- Language: PHP
- Homepage: https://packagist.org/packages/sunaoka/laravel-facade-generator
- Size: 56.6 KB
- Stars: 14
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Facade generator for Laravel
[![Latest Stable Version](https://poser.pugx.org/sunaoka/laravel-facade-generator/v/stable)](https://packagist.org/packages/sunaoka/laravel-facade-generator)
[![License](https://poser.pugx.org/sunaoka/laravel-facade-generator/license)](https://packagist.org/packages/sunaoka/laravel-facade-generator)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/sunaoka/laravel-facade-generator)](composer.json)
[![Laravel](https://img.shields.io/badge/laravel-%3E=%205.8-red)](https://laravel.com/)
[![Test](https://github.com/sunaoka/laravel-facade-generator/actions/workflows/test.yml/badge.svg)](https://github.com/sunaoka/laravel-facade-generator/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/sunaoka/laravel-facade-generator/branch/develop/graph/badge.svg)](https://codecov.io/gh/sunaoka/laravel-facade-generator)----
It is an artisan console command that generates services, service providers and facades.
## Installation
```bash
composer require --dev sunaoka/laravel-facade-generator
```## Usage
```bash
php artisan make:facade [Facade Name]
```## Configurations
```bash
php artisan vendor:publish --tag=facade-generator-config
``````php
[
'facade' => '',
'service' => 'Service',
'provider' => 'ServiceProvider',
],/*
|--------------------------------------------------------------------------
| Generate test
|
| If `false`, no test will be generated.
|--------------------------------------------------------------------------
*/'test' => true,
];
```## Example
```bash
php artisan make:facade Foo
```### Generated: app/Facades/Foo.php
```php
app->bind('Foo', FooService::class);
}
}
```### Generated: app/Services/FooService.php
```php
[
App\Providers\FooServiceProvider::class,
],'aliases' => [
'Foo' => App\Facades\Foo::class,
],
```### Laravel 11.x
You must add a providers in `bootstrap/providers.php`.
```php
return [
App\Providers\FooServiceProvider::class,
];
```and, You must add an aliases in `config/app.php`.
```php
'aliases' => [
'Foo' => App\Facades\Foo::class,
],
```