Weave 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
Laravel Tidb

Laravel Tidb Laravel Package

colopl/laravel-tidb

A Laravel database driver for TiDB, the MySQL-compatible distributed SQL database. It extends Laravel's MySQL grammar with TiDB-specific schema support such as AUTO_RANDOM columns, clustered indexes, and TiDB-aware migrations, so Eloquent and the query builder work naturally on TiDB clusters.

View on GitHub
Deep Wiki
Context7

Laravel database driver for PingCAP TiDB

Frequently asked questions about Laravel Tidb
What is colopl/laravel-tidb used for?
It is a Laravel database driver for PingCAP TiDB, the MySQL-compatible distributed SQL database. It lets Laravel's query builder, Eloquent, and schema migrations work against TiDB clusters, including TiDB-specific schema features. Use it when your Laravel application actually needs TiDB rather than standard MySQL.
Does colopl/laravel-tidb support Laravel 12?
Yes, version 5.0.0 of colopl/laravel-tidb is the release that adds Laravel 12 support. The package version is tied to Laravel major versions, so Laravel 12 projects should target the ^5.0 line. Confirm the exact PHP and Laravel constraint matrix in the repository before upgrading production applications.
How do I install colopl/laravel-tidb?
Install it with Composer, typically requiring colopl/laravel-tidb:^5.0 for Laravel 12. Register the package's service provider if your Laravel version does not auto-discover it, then configure a database connection using the TiDB driver. The evaluation notes that installation is feasible for Laravel 12 applications via Composer, service provider registration, and connection configuration.
How do I configure a TiDB connection in Laravel?
Configure TiDB as a database connection in Laravel's database configuration using the driver provided by colopl/laravel-tidb. TiDB is MySQL-compatible, so connection settings resemble a MySQL connection, but you should validate TiDB-specific behavior and driver options. Review the package documentation for the exact driver name and any required options.
What TiDB-specific features does this package add to Laravel?
The package extends Laravel's MySQL grammar with TiDB-specific schema support, including AUTO_RANDOM columns and clustered indexes. It also provides TiDB-aware migrations so schema changes behave correctly on TiDB clusters. These features let Laravel migrations express TiDB schema concepts that standard MySQL grammar does not cover.
Can I use colopl/laravel-tidb with Laravel 10 or 11?
The evaluation advises Laravel 10 and 11 applications to remain on colopl/laravel-tidb v4 unless they have a clear Laravel 12 upgrade program. v5.0.0 is focused on Laravel 12 support, and major-version bumps may drop older Laravel or PHP versions. Confirm the support matrix before changing versions.
Does colopl/laravel-tidb work with Eloquent and Laravel migrations?
Yes, the package is designed so Eloquent, the query builder, and Laravel migrations work naturally on TiDB. It builds on Laravel's database abstraction and extends the MySQL grammar for TiDB-specific schema features. You should still test transactions, JSON handling, collations, and auto-increment or sharding behavior against representative workloads.
Which TiDB versions are supported by colopl/laravel-tidb?
The provided context does not list exact TiDB versions, and the evaluation flags this as a key question to confirm with the maintainer or repository. TiDB's MySQL compatibility is strong but not identical, so test against the TiDB version you run in production. Document the supported TiDB, Laravel, and PHP matrix internally.
What are the breaking changes in colopl/laravel-tidb v5.0.0?
The release notes for v5.0.0 are described as minimal, with Laravel 12 support as the stated change. The main risk is undocumented implications such as dropped Laravel or PHP versions, dependency constraint changes, configuration or API breaks, and TiDB version requirements. Review the source diff and any upgrade guide before moving from v4 to v5.
Is colopl/laravel-tidb actively maintained?
The package appears to be community-maintained by Colopl rather than backed by a commercial SLA. Because its versions track Laravel major releases, you should monitor the repository for compatibility updates around Laravel upgrades. Plan for internal ownership of upgrade validation, TiDB compatibility testing, and incident response.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core