custom controller

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

custom controller

Post by mahammadareef » 02 Nov 2022, 09:33

i overwritten the pagecontroller for additional page load action, and when I updated the composer it gave me this warning ...

Warning: Ambiguous class resolution, "Aimeos\Shop\Controller\PageController" was found in both "D:\laragon\www\project1\vendor/aimeos-extensions/extcliqnshop/src\Aimeos\Shop\Controller\PageController.php" and "D:/laragon/www/project1/vendor/aimeos/aimeos-laravel/src\Aimeos\Shop\Controller\PageController.php", the first will be used.

things are working fine ..
is this right way...

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: custom controller

Post by aimeos » 06 Nov 2022, 19:07

You can't create a class with the same name and namespace as an existing one. Instead, you have to create a new class and add appropriate routes in your ./routes/web.php file for your new controller class.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply