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

Db Laravel Package

delight-im/db

A lightweight database abstraction layer for PHP with a simple API for running queries, prepared statements, transactions, and fetching results. It reduces boilerplate while keeping SQL explicit, making it a practical choice for projects that want straightforward database access without a full ORM.

View on GitHub
Deep Wiki
Context7

Safe and convenient SQL database access in a driver-agnostic way

Frequently asked questions about Db
What is delight-im/db used for?
delight-im/db is a lightweight PHP database abstraction layer for running explicit SQL queries, prepared statements, transactions, and fetching results without a full ORM. It is driver-agnostic and reduces boilerplate while keeping SQL visible. It fits standalone PHP services, legacy modules, CLI tools, and small applications more than a standard Laravel application.
Does delight-im/db work with Laravel?
It can be installed via Composer in a Laravel app, but it is not a drop-in replacement for Laravel's DB facade, query builder, or Eloquent. Laravel already provides mature connection management, transactions, migrations, and testing helpers, so adopting this package creates a parallel data-access path unless isolated behind repositories or adapters. Treat it as a tactical utility, not the default persistence layer.
How do I install delight-im/db?
Install it with Composer using the package name delight-im/db. Then configure a database connection in the package's own setup rather than duplicating Laravel's environment credentials. Confirm the required PDO extension for your database driver is enabled and test a simple read query before integrating it into application code.
Does delight-im/db support prepared statements?
Yes, the package is presented as providing prepared statements as part of its simple SQL access API. Safety still depends on disciplined use of parameter binding rather than string interpolation. For Laravel teams, validate its prepared-statement behavior and error handling against your database driver in a time-boxed spike.
How does delight-im/db handle transactions?
The package supports transactions as part of its lightweight database API, but the context does not confirm advanced details such as transaction nesting, savepoints, or connection retry behavior. Developers should verify those semantics for their exact PDO driver and database engine. For production use, add tests for commit, rollback, and failure paths before relying on it.
Which databases and PHP versions does delight-im/db support?
The package is described as driver-agnostic SQL access, but the provided context does not list explicit PHP versions, Laravel versions, or tested PDO drivers. You must validate compatibility against your exact PHP and database matrix, including charset, collation, and error-handling behavior. Do not assume Laravel-specific integration support without testing.
Can I use delight-im/db alongside Eloquent?
It can coexist technically, but using it alongside Eloquent risks fragmenting model events, authorization scopes, soft deletes, timestamps, and observability hooks. Keep Eloquent and the query builder for domain models and standard CRUD, and isolate delight-im/db behind an internal interface if you need it for a specific legacy or raw-SQL path. Avoid mixing data-access styles without clear boundaries.
Is delight-im/db safe for production?
It has MIT licensing and a small API, but low adoption signals such as 46 stars, zero dependents, and a modest score suggest limited ecosystem validation. The main risks are unclear long-term maintenance, limited Laravel integration patterns, and reliance on disciplined prepared statements and transaction handling. Require a time-boxed spike, adapter tests, observability, and a rollback plan before approving production use.
How does delight-im/db compare to Laravel's DB facade or query builder?
Laravel's DB facade and query builder are native, integrated with connections, transactions, migrations, and testing, and are the safer default for Laravel applications. delight-im/db offers explicit, driver-agnostic SQL access with less ORM overhead, but it is a general PHP package rather than a Laravel-native persistence layer. Choose it only when its simple SQL API provides a demonstrable advantage for an isolated use case.
How should I test or migrate to delight-im/db?
Start with an inventory of existing raw SQL or PDO usage and wrap the package behind an internal contract such as SqlGateway or a repository interface. Port one low-risk read path first, then a write path with transaction tests, and map Laravel's environment-driven credentials into the package's connection setup. Pilot in a non-critical module with observability and rollback before expanding.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo