I want to get the current product information in a controller.
I created a function in block, and called that function in my phtml file.
How can I accomplish this task?
To get product detail through controller you can refer to following links :
http://blog.chapagain.com.np/magento-2-get-current-category-current-product/ https://www.mageplaza.com/how-get-current-product-category-magento-2.html