redbaron76
redbaron76

Reputation: 357

How Laravel workbech package can auto boot another workbench package?

In Laravel 4 I'm developing 2 distinct workbench packages at the same time. Packages work in conjunction but I want to keep things separated. When they will be ready, the second will depend on the first one through Composer and everything will run well (hope so)... but now: How to make the first ServiceProvider auto boot the second ServiceProvider without writing two lines in /app/config/app.php ??

Now they work great adding two lines into 'providers' in /app/config/app.php but I just want to add one line to keep things easier. Thanks

Upvotes: 2

Views: 856

Answers (1)

Luis Dalmolin
Luis Dalmolin

Reputation: 3486

You can call the register method to do this, directly in your service provider.

$this->app->register('YourServiceProvider');

If you wish to call the register method outside a service provider, you will need to use the App Facade.

App::register('YourServiceProvider');

Upvotes: 2

Related Questions