I keep getting route not defined error and if I use url()
I get server can not provide a secure connection error.
I hope I can get some help.
route
To call a route by name, you should use the route function and add the parameters in an array as the second parameter.
route('product-show', [$table_name, $product->item_id])
The reason you get a route not defined error is that you are generating the url /product-show/{table_name}/{product_id}
and the actual url is /show/{table_name}/{product_id}
. Also, adding the parameters manually is bad practice when there are many helper functions that do this for you.