1
I’m having trouble returning only the value of select in the case is the name ,but it is returning as if it were string and this with column name.
Controller
public function resultadoconsulta(Request $request){
$nome = $request-> nomeCompleto;
$data = $request-> dataNascimento;
$paciente = Pacientes::select('nome_completo')
->where('nome_completo',$nome)
->where('data_nascimento',$data)
->get();
return view('/resultadoconsultapaciente')->withPaciente(json_encode($paciente));}
View
{{$paciente}}
Upshot
[{"nome_completo":"Leonardo Amancio de Araujo"}]
Why are you using json_encode?
– novic
Research could also be better
– novic