How to resolve a class in laravel container with extra arguments?
This works perfect and without any registration:
class myClass
{
public function __construct(Interf1 $i1, Interf2 $i2)
{
//some stuff
}
}
$mc = app()->make('myClass');
What happends if you need something like this:
class myClass
{
public function __construct(Interf1 $i1, Interf2 $i2, $x, $y)
{
//some stuff
}
}
Is there an option like:
$mc = app()->make('myClass',[10,20]);
or
$mc = app()->make('myClass')->with(10,20);
I know I can use setters but thats not the point..