Last active
February 8, 2017 17:35
-
-
Save evercode1/2cb2447684cf3a05da22acb4a5c3b05a to your computer and use it in GitHub Desktop.
chapter 13 RocketShipServiceProvider.php
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 characters
| <?php | |
| namespace App\Providers; | |
| use App\Utilities\RocketShip; | |
| use Illuminate\Support\ServiceProvider; | |
| use App\Utilities\Oxygen; | |
| use App\Utilities\FuelTank; | |
| class RocketShipServiceProvider extends ServiceProvider | |
| { | |
| protected $defer = true; | |
| /** | |
| * Bootstrap the application services. | |
| * | |
| * @return void | |
| */ | |
| public function boot() | |
| { | |
| // | |
| } | |
| /** | |
| * Register the application services. | |
| * | |
| * @return void | |
| */ | |
| public function register() | |
| { | |
| $this->app | |
| ->bind('App\Utilities\Contracts\RocketShipContract', | |
| function(){ | |
| return new RocketShip(new FuelTank(), new Oxygen()); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment