LaravelPackages.net
Acme Inc.
Toggle sidebar
alive2212/laravel-query-helper

Laravel Query Helper

394
2
v4.0.5
About alive2212/laravel-query-helper

alive2212/laravel-query-helper is a Laravel package for laravel query helper. It currently has 2 GitHub stars and 394 downloads on Packagist (latest version v4.0.5). Install it with composer require alive2212/laravel-query-helper. Discover more Laravel packages by alive2212 or browse all Laravel packages to compare alternatives.

Last updated

LaravelQueryHelper

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Note: Replace Babak Nodoust https://github.com/Alive2212 http://babakn.com [email protected] Alive2212 LaravelQueryHelper Laravel Query Helper with their correct values in README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md and composer.json files, then delete this line. You can run $ php prefill.php in the command line to make all replacements at once. Delete the file prefill.php as well.

This Package is smart deep where condition helper. you can deep where condition with many relation with just "." between your model and get your results.

Structure

bin/        
config/
src/
tests/
vendor/

Install

Via Composer

$   composer require alive2212/laravel-query-helper

Usage

for using just send array filter like following

    protected $filters = [ // or where condition every thing here
        [ // and  where condition every thing here
            ['id', '=', 1],
            ['title', '=', 'test'],
            ['folan.id', '=', 2],
            ['folan.bahman.id', '=', 3],
            ['folan.title', '=', 'test'],
            ['folan.bahman.amount', '>', 1000],
        ],
        [
            ['id', '=', 4],
            ['folan.id', '=', 5],
            ['folan.title', '=', 'test123'],
            ['folan.bahman.id', '=', 1],
            ['folan.bahman.title', '=', 'test2'],
        ],
        [
            ['id', '=', 7],
            ['folan.id', '=', 8],
            ['folan.title', '=', 'test1234'],
            ['folan.bahman.id', '=', 9],
            ['folan.bahman.title', '=', 'test21'],
        ]
    ];

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments