after installing some packages in laravel we should add class definition to providers array. as you know we have this array:
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
// ...
App\Providers\AnnotationsServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
],
my question is how can i add class to this array programical? does any ability in laravel to add it? for example:
App::install();
app.phpin your code since it should be in your VCS and gets cached by the framework.nwdartwe should add it to providers