laranail / db-tools
Independent Laravel database utilities — model traits (UUID/NanoID/ULID, audit log, soft-deletes-with-undo, soft-archive, JSON accessors), casts (money, datetime), schema macros & field groups, backup/restore, a database CLI command, connection & table inspection, a session read-model, and cursor +
Package info
pkg:composer/laranail/db-tools
Requires
- php: ^8.4 || ^8.5
- brick/money: ^0.13
- illuminate/database: ^13.0
- illuminate/support: ^13.0
- ramsey/uuid: ^4.7
- spatie/laravel-sluggable: ^4.0
- symfony/uid: ^7.0 || ^8.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- mockery/mockery: ^1.6
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.5
- rector/rector: ^2.0
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2026-07-08 18:13:11 UTC
README
Independent, framework-agnostic database utilities for Laravel — model traits (UUID/NanoID/ULID keys, JSON accessors, slugs, soft-archiving), money & datetime casts, schema macros, an audit observer, backup/restore, a database CLI, cursor/offset pagination, and inspection services.
PHP ^8.4 || ^8.5 on Laravel ^13 — depends only on illuminate/* plus a few small libraries, with no dependency on other Laranail packages.
Install
composer require laranail/db-tools
DbToolsServiceProvider is auto-discovered and registers the schema macros at boot.
Documentation
Full documentation is at opensource.simtabi.com/documentation/laranail/db-tools — installation, getting started, the model traits, casts, schema macros, the audit observer, backup/restore, the database CLI, and configuration.
Contributing & security
Issues and PRs are welcome — see CONTRIBUTING.md. Report vulnerabilities per SECURITY.md (opensource@simtabi.com); participation follows the Code of Conduct.
License
MIT © Simtabi LLC. See LICENSE.