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

Bagisto

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

How to create new Controller in Packages/Webkul/Shop

Modules
4
12
1.5k
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.
  • R
    Rakhi123 last edited by 6 Jun 2022, 11:44

    I want to customize the theme and wanted to create a new controller in Packages/Webkul/Shop folder. please tell me the suitable answers

    1 Reply Last reply Reply Quote 0
    • sanjay-webkul
      sanjay-webkul last edited by 6 Jun 2022, 11:57

      Hi @Rakhi123
      If you want to crete your custome controller then you can make controllers Here and create routes Here.
      And if you want to create a new theme or ovrride the default theme then please follow this Doc

      1 Reply Last reply Reply Quote 0
      • R
        Rakhi123 last edited by 7 Jun 2022, 05:58

        It has only the option to customize the existing controller. But I need to create my Own controller like a new controller.php file in the same location.
        whenever I create a controller using php artisan then it creates the controller in Public folder but I want to create the Controller in Packages/Webkul/Shop.
        Is it possibe?

        1 Reply Last reply Reply Quote 0
        • sanjay-webkul
          sanjay-webkul last edited by 7 Jun 2022, 07:32

          @Rakhi123
          Please take a reference form Here

          1 Reply Last reply Reply Quote 1
          • R
            Rakhi123 last edited by 7 Jun 2022, 11:03

            It is creating structure in this way. It is making 'Shop' folder inside controller
            C:\xampp\htdocs\bagisto-real\packages/Webkul/Shop//src/Http/Controllers/Shop/ShopTestController.php

            but I want like this
            C:\xampp\htdocs\bagisto-real\packages/Webkul/Shop//src/Http/Controllers/ShopTestController.php

            is there any method to create controller in package?

            1 Reply Last reply Reply Quote 0
            • sanjay-webkul
              sanjay-webkul last edited by 8 Jun 2022, 05:03

              @Rakhi123
              Please check your namespace I guess something is missing in your namespace
              Or you can copy any controller from the shop package and change the namespace of the controller accordingly

              1 Reply Last reply Reply Quote 0
              • R
                Rakhi123 last edited by 8 Jun 2022, 07:28

                My main need is to create a testcontroller in all the package folders like I want to create a controller in packages/Webkul/Shop//src/Http/Controllers/ShopTestController.php

                or

                packages/Webkul/Product//src/Http/Controllers/ProductTestController.php

                any method like package make:controller???

                1 Reply Last reply Reply Quote 0
                • 2 months later
                • sanjay-webkul
                  sanjay-webkul last edited by 19 Aug 2022, 09:49

                  Hi there,
                  Please use this command for the same.

                  php artisan package:make-shop-controller ShopTestController ACME/TestPackage
                  M 1 Reply Last reply 16 Jun 2023, 08:00 Reply Quote 0
                  • 10 months later
                  • M
                    mindwebtree @sanjay-webkul last edited by 16 Jun 2023, 08:00

                    @sanjay-webkul said in How to create new Controller in Packages/Webkul/Shop:

                    Hi there,
                    Please use this command for the same.

                    php artisan package:make-shop-controller ShopTestController ACME/TestPackage
                    

                    how to call front home page by this controller

                    1 Reply Last reply Reply Quote 0
                    • A
                      Amitk-Webkul last edited by 19 Jun 2023, 10:15

                      HI @mindwebtree,

                      Which version of Bagisto are you using?

                      M 1 Reply Last reply 19 Jun 2023, 10:46 Reply Quote 0
                      • M
                        mindwebtree @Amitk-Webkul last edited by 19 Jun 2023, 10:46

                        @Amitk-Webkul
                        bagisto version v1.5.1

                        1 Reply Last reply Reply Quote 0
                        • A
                          Amitk-Webkul last edited by 19 Jun 2023, 11:03

                          Hi @mindwebtree,

                          You can add the controller function in the below path.

                          Path: /packages/Webkul/Shop/src/Http/Controllers/HomeController.php

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