Suppose we want to add our custom functionality to the Bagisto, and if we change the core files of the Bagisto this will create a problem. To solve this problem here comes the concept of overriding the function
We are here overriding Velocity Controller in which ShopController function called search() in Custom Module
Step 1
First, we have to search the route that is hitting functions in our case it`s in packages/Webkul/Velocity/src/Routes/front-routes.php
Copy and paste the same route in the Custom Module and only change the Controller and function name as stated below
Step 2
Implement the Function in the Custom Module Controller
Step 3
Run the Command php artisan optimize
So, that was much about the article “ How to override controller in Bagisto ? ”. Also for any queries or doubts reach out to us at support@webkul.com. You can also raise a ticket at our HelpDesk System.
Additionally, if you want to add your custom functionalities to your project you can also Hire Laravel developer
You can also check out our Extensions for using amazing features in Bagisto