How to override Controller function in Bagisto

Updated 17 May 2023

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 [email protected]. 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

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


4 comments

  • umesh
    • Abhishek Kathuria (Moderator)
  • umesh
    • Abhishek Kathuria (Moderator)
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home