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

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

License

MIT License. See LICENSE for details.