how can I extend "JqadmController.php" 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
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

how can I extend "JqadmController.php" controller

Post by ahmed31916 » 15 Apr 2022, 06:22

how can I extend "aimeos-laravel\src\Aimeos\Shop\Controller\JqadmController.php" controller?

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

Re: how can I extend "JqadmController.php" controller

Post by aimeos » 16 Apr 2022, 08:08

Don't know if Laravel offers a way to overwrite controller actions from packages.

You may create a new controller, extend from JQAdmController, overwrite what you need and change the routes to your new controller. To disable the package routes for the JQAdmController, you need to set this in your ./config/shop.php (https://github.com/aimeos/aimeos-larave ... op.php#L15):

Code: Select all

'routes' => [
    // other routes
    'jqadm' => false,
    // other routes
 ],
Then, add this routes in your ./routes/web.php with your new controller:
https://github.com/aimeos/aimeos-larave ... hp#L18-L60
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply