Download the PHP package sukohi/where-json without Composer
On this page you can find all versions of the php package sukohi/where-json. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sukohi/where-json
More information about sukohi/where-json
Files in sukohi/where-json
Download sukohi/where-json
More information about sukohi/where-json
Files in sukohi/where-json
Vendor sukohi
Package where-json
Short Description A Laravel package to mange WHERE clause for json data.
License MIT
Package where-json
Short Description A Laravel package to mange WHERE clause for json data.
License MIT
Please rate this library. Is it a good library?
Informations about the package where-json
WhereJson
A Laravel package to mange WHERE clause for json data. (This is for Laravel 5+. For Laravel 4.2)
Installation
Execute composer command.
composer require sukohi/where-json:2.*
Preparation
Set WhereJsonTrait in your model like so.
<?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
$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.
Copyright 2016 Sukohi Kuhoh
All versions of where-json with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
~5.0
The package sukohi/where-json contains the following files
Loading the files please wait ...