A Laravel package that helps you to make the Facade & ready the facade structure.
Install the package via Composer:
composer require vivek-mistry/facade-makerphp artisan app:facade-maker
// Ask you for FacadeName and FacadeService
// FacadeName : FileUpload
// FacadeService : CommonFileUploadSo using above two files created at app/Facades & app/Facades/Services
- FileUpload.php
- CommonFileUpload.php
$this->app->singleton("commonfileupload", function ($app) {
return app(CommonFileUpload::class);
});For example :
class UserController extends Controller
{
public function index($request)
{
CommonFileUpload::fileupload($request->file)
}
}composer test- Vivek Mistry - Project creator and maintainer
MIT License. See LICENSE for details.
