Skip to content

vivek-mistry/facade-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Facade Maker

Laravel Facade Maker

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 artisan 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.

About

A Laravel Package that helps you create facade architecture.

Resources

License

Stars

5 stars

Watchers

1 watching

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors

Languages