2017 © Pedro Peláez
 

library where-json

A Laravel package to mange WHERE clause for json data.

image

sukohi/where-json

A Laravel package to mange WHERE clause for json data.

  • Thursday, June 2, 2016
  • by Sukohi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

WhereJson

A Laravel package to mange WHERE clause for json data. (This is for Laravel 5+. For Laravel 4.2), (*1)

Installation

Execute composer command., (*2)

composer require sukohi/where-json:2.*

Preparation

Set WhereJsonTrait in your model like so., (*3)

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Sukohi\WhereJson\WhereJsonTrait;

class JsonValue extends Model
{
    use WhereJsonTrait;
}

Usage

$items = \App\Item::whereJson('column', [1])->get();

or, (*4)

$items = \App\Item::whereJson('column', [
    'key1' => 'value1', 
    'key2' => 'value2', 
    'key3' => 'value3', 
])->get();
  • 1st argument is column name.
  • 2nd argument is array containing value you want to retrieve from the column value.

License

This package is licensed under the MIT License., (*5)

Copyright 2016 Sukohi Kuhoh, (*6)

The Versions

02/06 2016

2.0.x-dev

2.0.9999999.9999999-dev

A Laravel package to mange WHERE clause for json data.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

02/06 2016

2.0.1

2.0.1.0

A Laravel package to mange WHERE clause for json data.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

02/06 2016

1.0.x-dev

1.0.9999999.9999999-dev

A Larave package to mange WHERE clause for json data.

  Sources   Download

The Requires

 

by Avatar Sukohi

02/06 2016

1.0.2

1.0.2.0

A Larave package to mange WHERE clause for json data.

  Sources   Download

The Requires

 

by Avatar Sukohi

02/06 2016

dev-master

9999999-dev

A Laravel package to mange WHERE clause for json data.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

02/06 2016

2.0.0

2.0.0.0

A Laravel package to mange WHERE clause for json data.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

02/06 2016

1.0.1

1.0.1.0

A Larave package to mange WHERE clause for json data.

  Sources   Download

The Requires

 

by Avatar Sukohi

02/06 2016

1.0.0

1.0.0.0

A Larave package to mange WHERE clause for json data.

  Sources   Download

The Requires

 

by Avatar Sukohi