- How do I install the SingleStore Laravel driver?
- Install it with Composer using composer require singlestore/singlestore-laravel. The package is a first-party driver from SingleStore Labs that registers a singlestore connection driver on top of Laravel's Illuminate\Database layer. Package auto-discovery registers the service provider, so no manual provider entry is normally needed. After install, add a singlestore entry to config/database.php.
- Which Laravel and PHP versions does singlestore/singlestore-laravel support?
- Check the package's composer.json on the singlestore-labs/singlestoredb-laravel-driver repository for the exact Illuminate\Database and PHP constraints before committing. Database drivers are sensitive to internal changes in Laravel's Connection and Grammar classes, so confirm the supported Laravel major matrix rather than assuming broad compatibility. Ask the vendor about their upgrade cadence relative to new Laravel releases, since that is a real maintenance risk for this kind of package.
- Does the SingleStore Laravel driver work with Eloquent and the query builder?
- Yes. Because SingleStoreDB speaks the MySQL wire protocol, the driver largely subclasses Laravel's MySQL connector and connection classes, so Eloquent models, relationships, and most query builder calls should work unchanged. The practical gaps show up at the schema layer rather than the query layer. Test your heavier queries against a real SingleStore instance before promoting it to a primary connection.
- How do I configure a SingleStore connection in config/database.php?
- Add a connection entry with 'driver' => 'singlestore' plus the usual host, port (3306), database, username, and password keys. Because SingleStore uses the MySQL protocol, the rest of the configuration mirrors a standard MySQL connection. Keep it as a secondary connection first if you are adding SingleStore alongside an existing MySQL system of record.
- Can I create columnstore tables, shard keys, or reference tables with Laravel migrations?
- Not through Laravel's schema builder. SingleStore's differentiating features such as shard keys, sort keys, columnstore tables, and reference tables are not expressible in Laravel's Blueprint API. In practice you will drop to raw DDL via DB::statement for essentially every table where those characteristics matter. Treat the driver as making SingleStore queryable from Laravel, not fully manageable through Laravel migrations.
- Are database transactions supported with the SingleStore Laravel driver?
- The driver inherits transaction handling from Laravel's MySQL connection, so DB::transaction and manual beginTransaction calls will issue standard transaction statements. How those semantics behave across shards in SingleStore may diverge from developer expectations, which is a classic source of production data bugs. Verify transaction behavior against your actual table layout and topology before relying on it for critical writes.
- Can I use this driver as a drop-in replacement for Laravel's MySQL driver?
- At the connection and query layer it is a low-friction swap, since the driver builds on Laravel's MySQL connector and the SingleStore wire protocol is MySQL-compatible. The caveats are schema management, transaction semantics, and MySQL-driver assumptions like auto-increment and introspection shape that SingleStore only partially honors. Teams usually introduce it additively as a secondary analytics connection before considering it as the primary store.
- Does the driver support Laravel read/write connections and splitting?
- Laravel's read and write connection configuration is handled by the underlying connection class, but you should confirm the driver's actual implementation supports it rather than relying on the README. Read/write splitting is one of the operational semantics flagged as needing verification. Test it explicitly if your workload depends on separating analytical reads from transactional writes.
- Is singlestore/singlestore-laravel production-ready and actively maintained?
- It is a vendor-published first-party package from SingleStore Labs, so maintenance responsibility sits with the vendor rather than a broad community. Public signals are thin: the repository has roughly 234 stars but zero observable Composer dependents, meaning limited community-tested edge cases. Validate release cadence, issue responsiveness, and Laravel version support as part of your evaluation.
- What are the limitations of using SingleStore with Laravel compared to MySQL?
- The main limitation is schema: shard keys, columnstore layout, and reference tables require raw SQL, so migrations only partially describe your real database. Secondary concerns include transaction behavior across shards, auto-increment and introspection differences inherited from the MySQL driver assumptions, and MySQL DDL that SingleStore accepts but executes with different physical characteristics. It fits real-time analytics and high-throughput workloads well, but not teams that need deep ORM-driven schema management or heavy multi-statement transactions.