Where and how change controller logic of modules?

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!
oliwin4
Posts: 12
Joined: 16 Aug 2022, 08:36

Where and how change controller logic of modules?

Post by oliwin4 » 29 Aug 2022, 21:21

Where and how to change logic of modules (controllers)? For example catalog/lists?

I tried to create an extentions then I copied the exist core controller into a new extention directory:

Code: Select all

\sumka\myshop\packages\sumka\src\CatalogController.php
Inside method of controller I have added the following:

Code: Select all

	public function homeAction()
	{

		echo "test"
}
The I reset the cache views. But there is not result

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

Re: Where and how change controller logic of modules?

Post by aimeos » 31 Aug 2022, 07:12

You can't overwrite classes in Laravel that way. If you implement a new controller like you did, you can add a new route in your ./routes/web.php or replace an Aimeos route with your new controller if you disable the Aimeos route first:
https://github.com/aimeos/aimeos-larave ... #L257-L267
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply