Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ai Controller Frontend Laravel Package

aimeos/ai-controller-frontend

Laravel frontend controller for Aimeos: plug the shop into your app with ready-made product, catalog, basket and checkout pages plus search, customer and order handling. Integrates with Aimeos core for fast, scalable e-commerce.

View on GitHub
Deep Wiki
Context7

Getting Started

This package provides the frontend controller layer for the Aimeos e-commerce suite, handling request routing, view rendering, and business logic for customer-facing operations. To start:

  1. Install the full Aimeos Laravel package (aimeos/aimeos-laravel) as it includes ai-controller-frontend as a dependency.
  2. Publish config and views: php artisan vendor:publish --provider="Aimeos\Shop\ServiceProvider".
  3. Run migrations: php artisan migrate.
  4. Verify routes are loaded by visiting /shop (default) or check php artisan route:list | grep shop. First use case:Displaying a product list — {{ Aimeos::controller()->get( 'catalog/lists' ) }} in a Blade template.

Implementation Patterns

  • Controller chaining: Use Aimeos::controller()->get($action) in Blade to embed components like catalog/lists, basket/mini, account/profile.
  • Custom actions: Extend existing controllers by extending Aimeos\Shop\Controller\frontend\* classes and overriding methods (e.g., store, update) to inject custom logic.
  • State management: Pass data via view components using ['param' => 'value'] in Aimeos::controller()->get('action', $params).
  • Theme integration: Customize UI via Blade templates in resources/views/vendor/shop/; Aimeos uses a minimal layer over Laravel’s view system.
  • Debugging requests: Enable SHOP_DEBUG=1 in .env to log controller actions and views being rendered.

Gotchas and Tips

  • Route conflicts: Avoid naming custom routes shop* or account* to prevent collision with Aimeos routes defined in routes/shop.php.
  • Caching surprises: Views and configurations are cached — clear cache after overriding templates: php artisan view:clear && php artisan config:clear.
  • Multilingual pitfalls: Language selection depends on URL prefix (e.g., /en/catalog/lists) — ensure app_locale middleware handles redirection or use Aimeos::context()->getLocale() for explicit control.
  • DI limitations: Constructor injection isn’t used in frontend controllers — dependency is resolved via Laravel’s service container after instantiation, so avoid type-hinted dependencies in controller constructors.
  • Extensibility hooks: Override config via config/shop.php entries like controller/frontend/action arrays or use Aimeos\Controller\Frontend\abantecart::add() via event listeners (aimeos.controller.frontend.before) for hooks.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai