• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Best Way to Modify Route & Controller

General Discussion
3
7
840
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jc last edited by 15 Oct 2020, 06:29

    Will it be safe to modify files in \packages\Webkul?

    How should I modify route and controller in \packages\Webkul\Shop\src\Http?

    1 Reply Last reply Reply Quote 0
    • D
      deepak227 last edited by 15 Oct 2020, 06:46

      Hi @jc

      Can you clarify what actually you want to do with route and controller ?

      1 Reply Last reply Reply Quote 0
      • J
        jc last edited by 15 Oct 2020, 07:52

        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 controllers

        E.g:
        http://example.com/shop/usa
        http://example.com/shop/india
        http://example.com/shop/china

        1 Reply Last reply Reply Quote 0
        • D
          deepak227 last edited by 15 Oct 2020, 08:35

          hi @jc

          yes @jc you can overide the controller and route.

          After that please run the command when you overide the files.

          The Commands are
          php artisan config:cache
          php artisan cache:clear
          php artisan route:cache

          Hope this will work for you.

          Thank you

          Best Regards
          Deepak Singh Gusain

          1 Reply Last reply Reply Quote 0
          • J
            jc last edited by 15 Oct 2020, 09:04

            Can I know how the proper way to override the route and controller?

            1 Reply Last reply Reply Quote 0
            • D
              deepak227 last edited by 15 Oct 2020, 09:47

              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

              1 Reply Last reply Reply Quote 0
              • 11 days later
              • Z
                zainawan99 last edited by 26 Oct 2020, 05:10

                Please any code example how can override the controller and route Please sent best away to extend controller webkul?

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  Last post