App::bind('foo', function($app){ return new Foo; }); App::make('foo'); // If this class exists, it's returnedApp::make('FooBar'); App::singleton('foo', function(){ return new Foo; }); App::instance('foo', new Foo); App::bind('FooRepositoryInterface', 'BarRepository'); App::register('FooServiceProvider'); // Listen for object resolutionApp::resolving(function($object){});
No comments:
Post a Comment