I have a function of the controller where it calls me a command where I must pass it a list of projects that were assigned to a translation so that it looks for me in another table and registers them as recurrent contacts.
The issue is that I can not execute the command always throws me an error and I made the reference and nothing.
It throws me problems because I want to pass parameters to the command.
Controller
public function syncTranslate(Request $request,Project $project){
$this->authorize('update translate', TranslateProject::class);
$translateWithouthProyect = TranslateProject::filterData()->get();
Artisan::call('fidelizaleads:quotesWithoutProjects',$translateWithouthProyect);
exit;
return redirect()->route('translate.index')->with(notify()->success($count .' traducciones fueron añadidas al proyecto '. $project->name));
}
Command
protected $signature = 'fidelizaleads:quotesWithoutProjects';
protected $translate;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct($translate)
{
parent::__construct();
$this->translate = $translate;
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
Quote::executeQuoteTranslation($this->translate);
}
And this is the error message he throws at me
