How to create new Controller in Packages/Webkul/Shop
-
-
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? -
-
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.phpbut I want like this
C:\xampp\htdocs\bagisto-real\packages/Webkul/Shop//src/Http/Controllers/ShopTestController.phpis there any method to create controller in package?
-
@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 -
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???
-
Hi there,
Please use this command for the same.php artisan package:make-shop-controller ShopTestController ACME/TestPackage
-
@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
-
HI @mindwebtree,
Which version of Bagisto are you using?
-
@Amitk-Webkul
bagisto version v1.5.1 -
Hi @mindwebtree,
You can add the controller function in the below path.
Path: /packages/Webkul/Shop/src/Http/Controllers/HomeController.php