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

Meekrodb Laravel Package

sergeytsalkov/meekrodb

MeekroDB is a lightweight PHP MySQL library that makes database access simple and safe. It offers concise query helpers, named and positional placeholders for automatic SQL injection protection, easy inserts, updates, deletes, and result handling without heavy ORM overhead.

Deep Wiki
Context7

MeekroDB -- The Simple PHP MySQL Library

Frequently asked questions about Meekrodb
What is MeekroDB and how does it work with Laravel?
MeekroDB is a standalone PHP MySQL client that uses static configuration such as DB::$user and DB::$host along with DB::query() helpers. It is not a Laravel component and bypasses Illuminate\Database\DatabaseManager, so connection resolution, query events, Telescope, and RefreshDatabase isolation do not apply automatically. In Laravel you must bridge it manually, typically through a service provider and an adapter. Treat it as a second parallel data path rather than an extension of the framework.
How do I install MeekroDB in a Laravel application?
Install it with Composer using sergeytsalkov/meekrodb and pin the version explicitly because the project has no release cadence aligned to Laravel or PHP support windows. Register a singleton in a service provider that hydrates MeekroDB's static properties from config('database.connections.mysql') so credentials are not duplicated. Wrap access behind a repository or adapter interface so call sites never touch DB:: statics directly, which makes later removal mechanical instead of archaeological.
Is MeekroDB safe from SQL injection?
MeekroDB provides named and positional placeholders that parameterize values, which protects the common injection paths when used consistently. Raw query fragments, dynamic identifiers, ORDER BY clauses, and table names still need careful handling because placeholders only cover values. Keep the library behind a narrow adapter and review every call site that builds SQL dynamically.
Can I use DB::transaction with MeekroDB?
No. MeekroDB runs its own connection and transaction scope, so a MeekroDB write cannot be rolled back by Laravel's DB::transaction. Mixing both layers inside one unit of work creates split transaction boundaries and partial-write failure modes that are hard to reproduce. If you must use both, keep MeekroDB confined to isolated read-mostly or reporting paths rather than shared business transactions.
Does MeekroDB support Laravel 11 and PHP 8?
MeekroDB is framework-agnostic PHP, so it can run under Laravel 11 and PHP 8, but the project is single-maintainer with no release cadence aligned to Laravel or PHP support windows. Verify compatibility on your exact PHP version and treat it as an unmanaged dependency in your upgrade planning. There is no official Laravel integration package to rely on for support.
Will MeekroDB work with Laravel Octane or Swoole?
MeekroDB stores configuration and connection state on class statics, which persist across requests in long-lived workers. That is hostile to Octane, Swoole, queue workers, and multi-tenant or multi-connection designs where state must not leak between requests. Avoid it in those environments unless you can prove the static state is safely reset per request.
Does MeekroDB support SQLite or PostgreSQL?
No. MeekroDB is MySQL-only, so it cannot target Postgres, SQLite, or other drivers. Laravel's default in-memory SQLite test setup will silently diverge from production if MeekroDB queries are involved, so CI must run MySQL for any test exercising that code path. Confirm MySQL is guaranteed for every environment including CI and disaster recovery before adopting it.
How do I handle MeekroDB exceptions in Laravel?
MeekroDB throws MeekroDBException rather than Illuminate\Database\QueryException, so unhandled errors bypass Laravel's exception handler configuration. Map the exception inside your adapter so framework logging, Sentry grouping, APM, and user-facing error responses behave consistently. Otherwise error reporting will fragment between the two data layers.
What license does MeekroDB use and is it okay for commercial Laravel apps?
MeekroDB is licensed under LGPL-3.0, which is generally acceptable for unmodified dynamic use but requires legal sign-off. The risk grows if you vendor, patch, or statically link the library into a distributed artifact. Have legal review it against your distribution and modification policy before committing.
Is MeekroDB a good alternative to Eloquent for a new Laravel app?
No. For a greenfield Laravel service, MeekroDB is a poor fit because it bypasses connection management, query logging, transactions, and test isolation that Eloquent and the Query Builder provide. Its only defensible case is a bounded, read-mostly adapter around legacy MeekroDB code being strangled into Laravel, or isolated reporting and ETL paths. New application code should use Eloquent or the Query Builder, with a time-boxed exit plan for any MeekroDB usage.
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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment