I'm having a problem with a route from my system.
Route::get('/atualizacoes/list', 'AtualizacoesController@listarIndex')->name('atualizacoes.listar');
By what I understand it is interpreting the "list" in "/ updates / list" as if it were a value. Anyone have any ideas how to resolve?
Error:
Invalid input syntax for integer: \ "list \" (SQL: select * from \ "ger_address \" where \ "att_codigo \" =
Controller code:
public function show($id){
$atualizacao = GerAtualizacao::where('att_codigo', $id)->first();
return response()->json($atualizacao);
}
public function listarIndex(){
$atualizacoes = GerAtualizacao::all();
return response()->json($atualizacoes);
}
It was for it to enter the "listarIndex" function but it enters the "show" function