I have a controller that I may or may not receive a request If I receive it I will use it
It turns out that it is always entering the condition, even when it is false I'm testing a true or false value What's wrong?
$turmas_todas = isset($request->todas) ? $request->todas : true;
if ($turmas_todas) {
print_r($turmas_todas);
$value[$i]['id_turma'] = '';
$value[$i]['codigo_turma'] = 'TODAS';
}
Is there another better way to do it in Laravel?