Add multiple classes to Laravelâs IoC container? -
I created a KamBench package in Laravel 4, which is a name-space and has two directories: Models and References . Either way, Laravel is loading my model into my Models directory (I have a model in which I want to be able to use my contextual sections in the controllers of my app without specifying my names, so I thought that ... I would like to add them to the IOI container? However, it seems that I have to create a mask category for each category which I want to add to the container. this ???? T is not desirable if I have dozens of reference sections, as it would also mean making the same amount of mask sections. Is there a way in the Laravel to add classes to its IOC container? If you want to use a term facades for your classes (like If your classes are not found in the reference folder, then you should check your I use classes within the builders of the classes, so that you can do the user is named}, however, in my classes Do not know the References directory.
MyModel: : SomeAction () ) Then you have to make your facades. But I advise not to do this for so many classes.
composer.json file under autoload entry or
musician dump-autoload-o Do it
$ This-> MyService-> Some actions () .
Comments
Post a Comment