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
Singlestoredb Laravel

Singlestoredb Laravel Laravel Package

singlestoredb/singlestoredb-laravel

Official SingleStoreDB driver for Laravel. Wraps Laravel’s MySQL support to improve compatibility and add SingleStore features: Eloquent/migration extensions (columnstore/rowstore, shard/sort keys, etc.), JSON column support, query fixes, and tested across PHP/Laravel versions.

View on GitHub
Deep Wiki
Context7

SingleStoreDB Driver for Laravel adds first-class SingleStoreDB support by wrapping Laravel’s MySQL driver and improving compatibility. It enhances Eloquent and migrations so you can use SingleStore-specific capabilities without leaving familiar Laravel APIs.

Designed and integration-tested across a matrix of PHP/Laravel versions, it also includes practical fixes for query generation and datatype handling.

  • Eloquent & migration extensions for SingleStore features (e.g., shard/sort keys, columnstore/rowstore)
  • Improved JSON column support
  • Compatibility fixes for Laravel query generation
  • Guidance for Managed Service connections and persistent connections
  • Supports advanced schema options like computed columns and temporary/reference tables
Frequently asked questions about Singlestoredb Laravel
How do I install the SingleStoreDB Laravel driver?
Run `composer require singlestoredb/singlestoredb-laravel` and update your `config/database.php` to use the `singlestoredb` connection driver instead of `mysql`. The package replaces Laravel’s MySQL driver with SingleStoreDB-specific optimizations.
Does this driver support SingleStoreDB’s Universal Storage (columnstore) tables?
Yes. Use `columnstore()` in migrations to define Universal Storage tables. The driver extends Laravel’s schema builder to support SingleStoreDB-specific features like `shardKey()`, `sortKey()`, and `columnstore()` for hybrid transactional/analytical workloads.
Will my existing Laravel Eloquent models work with SingleStoreDB?
Mostly yes. The driver wraps Laravel’s MySQL driver, so existing Eloquent queries will work. However, SingleStoreDB-specific features (e.g., shard keys, computed columns) require explicit migration syntax. Test with a staging environment first.
How do I configure persistent connections for better performance?
Add `'options' => [PDO::ATTR_PERSISTENT => true]`, along with SSL settings if using SingleStoreDB Managed Service, in your `config/database.php` under the `singlestoredb` connection. Persistent connections reduce overhead but may need cleanup in long-running Laravel processes.
What Laravel versions are officially supported?
The driver is tested across a matrix of PHP/Laravel versions, including Laravel 9+ and PHP 8.1+. Check the GitHub Actions workflow for the latest compatibility matrix. For PHP <8.1, workarounds are needed due to PDO quirks.
Can I use JSON columns in SingleStoreDB with this driver?
Yes. The driver includes improved JSON column support. Use `json()` in migrations (e.g., `$table->json('metadata')`) and query JSON data with Laravel’s built-in JSON helpers like `->whereJsonContains()`.
How do I handle SingleStoreDB Managed Service SSL requirements?
Add SSL options to your `config/database.php` connection: `'sslmode' => 'verify-full', 'sslcert' => base_path('singlestore_bundle.pem')`. The driver supports standard MySQL SSL/TLS configurations for secure connections.
Are there limitations with Laravel’s Query Builder (e.g., ORDER BY in DELETE)?
Yes. Some Laravel Query Builder methods (e.g., `DELETE ... ORDER BY`) aren’t directly supported by SingleStoreDB. Configure the driver to ignore such clauses or rewrite queries manually. Check the README for `ignore_order_by_in_deletes`.
How do I migrate an existing Laravel app from MySQL to SingleStoreDB?
Start by updating your `config/database.php` to use the `singlestoredb` driver. Test migrations with SingleStoreDB-specific features (e.g., `shardKey()`) in a staging environment. Use `php artisan migrate:fresh` to rebuild the schema if needed.
What alternatives exist for SingleStoreDB in Laravel?
For MySQL-compatible databases, consider `doctrine/dbal` or raw PDO for direct SingleStoreDB access, but they lack Laravel’s Eloquent integration. This driver is the official, Laravel-native solution for SingleStoreDB, offering seamless Eloquent and migration support.
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