vivek-mistry / facade-maker
Laravel package using for creating a new facade and it's structure.
1.0.0
2025-05-03 09:16 UTC
Requires
- php: ^8.2||^8.3||^8.4
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^3.8
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
This package is auto-updated.
Last update: 2025-05-13 09:12:13 UTC
README
A Laravel package that helps you to make the Facade & ready the facade structure.
🛠️ Installation
Install the package via Composer:
composer require vivek-mistry/facade-maker
How to generate the Facade?
php app:facade-maker // Ask you for FacadeName and FacadeService // FacadeName : FileUpload // FacadeService : CommonFileUpload
So using above two files created at app/Facades & app/Facades/Services
- FileUpload.php
- CommonFileUpload.php
Register Your Facades in the AppServiceProvider
$this->app->singleton("commonfileupload", function ($app) { return app(CommonFileUpload::class); });
HOW TO USE IN YOUR CONTROLLER?
For example :
class UserController extends Controller { public function index($request) { CommonFileUpload::fileupload($request->file) } }
Testing
composer test
Credits
- Vivek Mistry - Project creator and maintainer
License
MIT License. See LICENSE for details.