-1
Good Morning
In my controller to make the Show view work I have following code
public function show($id){
$produto = Produtos::find($id);
return view('produtos.produtosShow', array('produto' => $produto));}
When I type in the public/products/1 url, it is working correctly.
But I want to change the search for id by another field such as product code.
My table Products has following fields, id, code, description.
I want to be able to type in the *public/ products url/*codeDoProduct and view the product according to the code entered.
Thank you.
Thank you for your help and explanation
– Junior