Bagisto Forum

    Bagisto

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

    How to create new Controller in Packages/Webkul/Shop

    Modules
    4
    12
    1492
    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

      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

        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

          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

            @Rakhi123
            Please take a reference form Here

            1 Reply Last reply Reply Quote 1
            • R
              Rakhi123 last edited by

              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

                @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

                  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
                  • sanjay-webkul
                    sanjay-webkul last edited by

                    Hi there,
                    Please use this command for the same.

                    php artisan package:make-shop-controller ShopTestController ACME/TestPackage
                    M 1 Reply Last reply Reply Quote 0
                    • M
                      mindwebtree @sanjay-webkul last edited by

                      @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

                        HI @mindwebtree,

                        Which version of Bagisto are you using?

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          mindwebtree @Amitk-Webkul last edited by

                          @Amitk-Webkul
                          bagisto version v1.5.1

                          1 Reply Last reply Reply Quote 0
                          • A
                            Amitk-Webkul last edited by

                            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
                            • First post
                              Last post