I just went back to laravel again and after a while practicing what I knew I ran into a problem that according to me there was nothing wrong until I did it and that was when from the form in action I wanted to use the update method through the router as in the example:
<form id="formUpdateCalzado" method="PUT" action="{!! route('calzado.update', $idproducto) !!}" >
By the way, when inspecting the code and looking at what the footwear.update route generated for me and with the product id data, if the route was generated correctly:
action="http://127.0.0.1:8000/calzado/1"
This is the part I use to get all the methods:
Route::resource('calzado', CalzadoController::class);
And the controller method is as follows:
public function update(Request $request, $id)
{ //intente imprimir el dato de entrada
return $id;
// tambien intente usar el echo $id;
}
Well this is the only thing I have, so when I submitted to the form to update product data and from the update method of the controller I wanted to print the data on the screen, nothing was displayed. But I don't understand why and just like when I did an eloquemet query where I received the product id it didn't work either, do they know what I'm doing wrong or why the update isn't working for me? It seems that it is not entering the method because it does not print the values. I also add in my form the @csrf but it doesn't work either. All I want is for it to work and print the data but it doesn't. Help me please. By the way, when using footwear.edit, the route and the edit method work for me