- What is Laracombee and what does it do in a Laravel app?
- Laracombee is a Laravel package that wraps the Recombee recommendation API behind a Laravel-friendly interface. It lets you work with users, items, user-item interactions, and personalized recommendations without hand-rolling HTTP calls to Recombee. It is aimed at e-commerce platforms, media libraries, and marketplaces that want to boost engagement with recommendations.
- How do I install Laracombee with Composer?
- Run composer require amranidev/laracombee. Laravel package discovery registers the service provider automatically, so no manual provider registration is needed. If you want to customize settings, publish the config with php artisan vendor:publish --tag=laracombee-config and add your Recombee database ID and private token.
- Which PHP and Laravel versions does Laracombee support?
- The package requires PHP 8.2 or later and the README lists Laravel 10, 11, and 12. The 1.0.0 release adds Laravel 13 support, giving an effective window of Laravel 10 through 13. Because that is four majors, check composer.json and the CI matrix yourself if your team runs an older PHP baseline such as 8.1.
- How do I configure my Recombee database ID and token in Laracombee?
- Publish the config file with php artisan vendor:publish --tag=laracombee-config, then edit config/laracombee.php. Add your Recombee database ID and private token there, ideally sourced from environment variables rather than committed. The same file also exposes protocol, timeout, and region settings.
- How do I tell Laracombee which user and item models to use?
- Set the user and item keys in config/laracombee.php, for example 'user' => App\Models\User::class and 'item' => App\Models\Book::class. These classes are what the package commands use when interacting with Recombee. Point them at the Eloquent models that represent your catalog and customers.
- Can I test Laracombee without calling the real Recombee API?
- Yes. The package ships offline, fake-based test coverage built on PHPUnit 10+, so your suite does not need network access or a live Recombee database. That removes flaky network-dependent tests from CI and local development. It also makes contract-style testing practical for microservices that depend on recommendation calls.
- Is Laracombee 1.0.0 a breaking change from 0.3.1?
- A 0.x to 1.0.0 jump permits breaking changes by definition, and the release notes list only one PR about Laravel 13 support and reliability improvements. Treat the changelog as a documentation gap rather than a safety guarantee. Review the v0.3.1...v1.0.0 compare diff and check method signatures, return types, config keys, and published assets before upgrading.
- How do I get personalized recommendations for a user with Laracombee?
- Once users, items, and interactions are synced to Recombee, you request recommendations through the package's recommendation interface, which proxies Recombee's recommendation endpoint. The quality of results depends on having meaningful interaction data such as purchases, views, or ratings flowing in first. Use it to render related items, home feed blocks, or similar-product sections.
- Should I use Laracombee or the Recombee PHP SDK directly?
- Laracombee is a thin Laravel-flavored layer over Recombee, so it mainly saves you wiring: package discovery, a publishable config file, and model mappings for users and items. Choose the official SDK if you want to stay closest to Recombee's own API surface and release cadence. Choose Laracombee if you want configuration driven by Laravel conventions and less boilerplate in your app.
- What timeout and protocol settings should I use in production with Laracombee?
- The config exposes protocol, timeout, and region, with protocol defaulting to http and timeout to 2000 milliseconds. Set the protocol to https in production so tokens are never sent in clear text, and tune the timeout against your request latency budget. Also confirm the region matches where your Recombee database is hosted to avoid unnecessary round-trip time.