Best Way to Modify Route & Controller
-
Will it be safe to modify files in
\packages\Webkul
?How should I modify route and controller in
\packages\Webkul\Shop\src\Http
? -
Hi @jc
Can you clarify what actually you want to do with route and controller ?
-
I need to display catalog following inventory source, each catalog will show different info, e.g: different banner, different promotion image and etc.
may need to add new route and modify some part of controllersE.g:
http://example.com/shop/usa
http://example.com/shop/india
http://example.com/shop/china -
-
Can I know how the proper way to override the route and controller?
-
Hi @jc
For routes
go to the package , then search for the route file check how the routes are define.
define your own route and then save that file.For Controller
go to the package , then search for controller add the function or override the function whatever you want and then save that file.At last after saving the files please run the above command and check the result.
Thank you
-
Please any code example how can override the controller and route Please sent best away to extend controller webkul?