Created
September 17, 2016 00:20
-
-
Save undefinedzain/a1a4f1d9630a24b4ce67c9e2ff2c55df to your computer and use it in GitHub Desktop.
Revisions
-
undefinedzain created this gist
Sep 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ 1. Create a custom class <?php namespace App\Libraries; class Tes { public function tes() { echo "Tes"; } } ?> 2. Create a facade class <?php namespace App\Classes\Facades; use Illuminate\Support\Facades\Facade; class TesFacade extends Facade { protected static function getFacadeAccessor() { return 'tes'; } } ?> 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, 'Xtrf' => App\Libraries\TesFacade::class, 6. composer dump-autoload 7. Done