Skip to content

Commit fca7355

Browse files
committed
Add note to docs about registering providers at run-time.
1 parent db8beca commit fca7355

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ioc.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ To create a service provider, simply extend the `Illuminate\Support\ServiceProvi
152152

153153
Note that in the `register` method, the application IoC container is available to you via the `$this->app` property. Once you have created a provider and are ready to register it with your application, simply add it to the `providers` array in your `app` configuration file.
154154

155+
You may also register a service provider at run-time using the `App::register` method:
156+
157+
**Registering A Service Provider At Run-Time**
158+
159+
App::register('FooServiceProvider');
160+
155161
<a name="container-events"></a>
156162
## Container Events
157163

0 commit comments

Comments
 (0)