PHPackages                             ooxif/laravel-query-param - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ooxif/laravel-query-param

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

ooxif/laravel-query-param
=========================

Treats binary data in a correct way with Laravel's database system (Eloquent)

1.0.3(9y ago)53.9k[1 issues](https://github.com/ooxif/laravel-query-param/issues)MITPHPPHP &gt;=5.4.0

Since May 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ooxif/laravel-query-param)[ Packagist](https://packagist.org/packages/ooxif/laravel-query-param)[ RSS](/packages/ooxif-laravel-query-param/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

laravel-query-param
===================

[](#laravel-query-param)

Treats binary data in a correct way with Laravel's database system (Eloquent).

What laravel-query-param does
-----------------------------

[](#what-laravel-query-param-does)

Laravel uses PDO &amp; PDOStatement, passes parameters to PDOStatement::execute().
PDOStatement::execute() treats all parameters as PDO::PARAM\_STR which breaks some binary data.

`laravel-query-param` overrides PDOStatement::execute() to treat binary data as PDO::PARAM\_LOB.

Install
-------

[](#install)

`composer require "ooxif/laravel-query-param:1.0.*"`

then add `'Ooxif\LaravelQueryParam\QueryParamServiceProvider',` to `providers` in `config/app.php`.

Examples
--------

[](#examples)

```
// table contains a binary column
Schema::create('images', function ($table) {
    $table->increments();
    $table->timestamps();
    $table->binary('data');
});

// use ModelTrait, add '(column name)' => 'binary' to $casts
class Image extends Eloquent
{
    use Ooxif\LaravelQueryParam\ModelTrait;

    protected $table = 'images';

    protected $casts = [
        'data' => 'binary',
    ];
}

$lob = 'some binary data';
$image = new Image();

// setting/getting
$image->data = $lob;
$image->data; // object(Ooxif\LaravelQueryParam\Param\ParamLob)
$image->data->value() === $lob; // true

// saving
$image->save();

// querying (model) - use param_lob()
$image = Image::where('data', param_lob($lob))->first();

// querying (db) - use param_lob()
$result = DB::table('images')->where('data', param_lob($lob))->first();
$result->data === $lob; // true
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Total

4

Last Release

3624d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84bb01b4d64a4d280e691c97775b56f71f1c5a04ccb17971a1a7cb2fba0cd53e?d=identicon)[ooxif](/maintainers/ooxif)

---

Top Contributors

[![ooxif](https://avatars.githubusercontent.com/u/2757640?v=4)](https://github.com/ooxif "ooxif (9 commits)")[![c198130](https://avatars.githubusercontent.com/u/15109346?v=4)](https://github.com/c198130 "c198130 (1 commits)")[![furey](https://avatars.githubusercontent.com/u/1914481?v=4)](https://github.com/furey "furey (1 commits)")

---

Tags

laraveleloquent

### Embed Badge

![Health badge](/badges/ooxif-laravel-query-param/health.svg)

```
[![Health](https://phpackages.com/badges/ooxif-laravel-query-param/health.svg)](https://phpackages.com/packages/ooxif-laravel-query-param)
```

###  Alternatives

[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
