I'm trying to call one function (get the week day(is working)) that I've made on Controller e needed two variables. But when I call from the view (using Blade from Laravel) I got the message that I'm passing only one atribute, instead two.
My control:
public function getWeekDay($monthYear, $qtdDay){
$month = substr($monthYear, 0, 2);
$year= substr($monthYear, 3, 4);
$month = $month + 1;
$lastDay = date('m/d/Y', mktime(0, 0, 0, $month, 0, $year));
$firstDay = strtotime($lastDay . ' +'.$qtdDay.' Weekday');
return date('d/m/Y', $firstDay);
}
My view:
{!! app(App\\Http\\Controllers\\Site\\TarefaController::class)->getWeekDay( [$monthYear , $qtdDay ) }}
Is it the way that I should call function from Blade??