- How do I install loonpwn/laravel-swiftype in a Laravel app?
- Install it with Composer using loonpwn/laravel-swiftype, then follow the package's normal Laravel setup: publish the config and add your Swiftype credentials. In a Laravel 9 app this should be a low-effort integration, but confirm your PHP runtime is 8.0+ because Laravel 9 requires it. The package is a thin service-provider wrapper, so expect to register the models you want indexed rather than rewriting application architecture.
- Does laravel-swiftype support Laravel 9?
- Version 2.0.3 widens the illuminate/support constraint to include 9.x, so Composer can install it in Laravel 9 projects. That change is a declared compatibility claim, not proof that the package's CI matrix was run against Laravel 9. Treat it as supported only after your own smoke tests pass, especially if search is critical.
- What PHP version do I need for laravel-swiftype 2.0.3?
- Laravel 9 requires PHP 8.0 or newer, so that is the practical baseline for using laravel-swiftype 2.0.3 in a Laravel 9 application. The release notes only mention the illuminate/support constraint, so there is no separate PHP constraint change to rely on. If you are still on PHP 7.4, the Laravel 9 compatibility bump does not help you.
- How do I index Eloquent models with laravel-swiftype?
- The package is designed as an adapter between Eloquent models and the Swiftype API, with helpers for indexing records. You register the models or indexing hooks your app needs, then let the package send document data to the hosted search engine. Keep the indexing logic close to model events or queued jobs so search writes do not slow normal requests.
- Can I queue Swiftype index writes in Laravel?
- Yes, queuing index writes is the sensible pattern for a Laravel app because the actual search index lives in an external SaaS endpoint. Push indexing work onto Laravel queues so a slow or unavailable Swiftype API does not block user requests. The package fits Laravel's job and service-container conventions, but you still need to handle retries and failures in your own job setup.
- Where do I configure Swiftype API credentials for Laravel?
- Publish the package config and supply your Swiftype credentials through environment variables or your secret store rather than committing them. The package follows Laravel package conventions, so configuration is the normal integration point. Also confirm your deployment allows outbound access to the Swiftype API, since the package cannot index or query without it.
- Is laravel-swiftype safe for production given Swiftype/Elastic Site Search deprecation?
- The dominant risk is upstream: Swiftype was folded into Elastic Site Search, and hosted Site Search has been on a deprecation path. laravel-swiftype is a thin adapter, so it inherits that service lifecycle risk entirely; release 2.0.3 does not address it. For production, ask for the contractual end-of-life date and have a fallback plan before making search a critical dependency.
- What changed in laravel-swiftype 2.0.3?
- 2.0.3 is a narrow compatibility release: the only functional change is widening illuminate/support to include Laravel 9.x. There are no public API, config schema, or behaviour changes signalled in the notes. Upgrading from 2.0.2 should be a patch-level Composer bump with no expected code changes.
- How do I test laravel-swiftype integration without hitting the live Swiftype API?
- There is no test-matrix change mentioned for 2.0.3, so do not assume Laravel 9 was exercised upstream. Add your own smoke suite that covers config loading, credential wiring, indexing, and querying, and mock or fake the HTTP layer so tests do not depend on the live Swiftype API. Because ranking and index schema live in the vendor console, also verify expected results against a staging engine.
- Are there alternatives to laravel-swiftype if Elastic Site Search is retired?
- If Elastic Site Search is retired, the safest fallback is to replace the driver with another search backend such as Elasticsearch, OpenSearch, or Algolia. How much code you rewrite depends on how much vendor-specific Swiftype logic leaked into your models and jobs; keep indexing and querying behind your own small interface to reduce that coupling. laravel-swiftype is convenient, but it is not a search abstraction layer.