I was testing some functionality on the project site I'm doing in MVC, but it has a function that is not working anymore. When I access the site it says:
"Method App \ Http \ Controllers \ updates :: return_user () does not exist "
Route:
Route::get("/update_user", "updates@retorna_usuario")->middleware('login');
But I do have this method in the controller:
class updates extends Controller
{
public function retorna_usuario()
{
$cargo = session('cargo');
$prontuario = session('prontuario');
$perfil = DB::table("users")->where('prontuario', '=', $prontuario)->OrderBy('nome')->first();
if($cargo == "A")
return view('editar.update_admin')->with('perfil', $perfil);
if($cargo == "P" || $cargo == "O")
return view("editar.update_user")->with('perfil', $perfil);
}}
What's wrong with the code? I've already used composer update
at prompt but it's still giving this error. What should I do?