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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport