Skip to content

Instantly share code, notes, and snippets.

@arielgk
Forked from undefinedzain/steps.md
Last active February 22, 2017 21:00
Show Gist options
  • Select an option

  • Save arielgk/cd76daf373f945525b6652c3a3965688 to your computer and use it in GitHub Desktop.

Select an option

Save arielgk/cd76daf373f945525b6652c3a3965688 to your computer and use it in GitHub Desktop.
Add Custom Facade on Laravel 5.3
  1. Create a custom class

  2. Create a facade class

  3. Create a provider using -> php artisan make:provider TesProvider

  4. Add On that provider, in register function $this->app->bind('tes', function () { return new \App\Libraries\Tes; });

  5. Add to config/app.php App\Providers\TesProvider::class, 'Utils' => App\Facades\UtilsFacade::class,

  6. composer dump-autoload

  7. Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment