A query database collection for use with Laravel Pipeline

Overview

A query database collection for use with Laravel Pipeline

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package contains a collection of class that can be used with Laravel Pipeline. Let's see below queries:

when($request->is_admin ?? null, function($query, $isAdmin) { $query->where('is_admin', $isAdmin ? 1 : 0); }) ->when($request->created_at_from ?? null, function($query, $date) { $query->where('created_at', '>=', $date); }) ->when($request->created_at_to ?? null, function($query, $date) { $query->where('created_at', '<=', $date); }) ->get();">
// users?name=Baro&is_admin=1&created_at_from=2022-06-01&created_at_to=2022-06-31
$users = User::query()
    ->when($request->name ?? null, function($query, $name) {
        $query->where('name', 'like', "%$name%");
    })
    ->when($request->is_admin ?? null, function($query, $isAdmin) {
        $query->where('is_admin', $isAdmin ? 1 : 0);
    })
    ->when($request->created_at_from ?? null, function($query, $date) {
        $query->where('created_at', '>=', $date);
    })
    ->when($request->created_at_to ?? null, function($query, $date) {
        $query->where('created_at', '<=', $date);
    })
    ->get();

As you all can see, it's obviously that filter conditions will continue to grow as well as the duplication of same filter for other queries. We can use Laravel Pipeline combine with some pre-made queries to refactor this

use Baro\PipelineQueryCollection;

// users?name=Baro&is_admin=1&created_at_from=2022-06-01&created_at_to=2022-06-31
$users = Users::query()->filter([
    new PipelineQueryCollection\RelativeFilter('name'),
    new PipelineQueryCollection\BooleanFilter('is_admin'),
    new PipelineQueryCollection\DateFromFilter('created_at'),
    new PipelineQueryCollection\DateToFilter('created_at'),
])
->get();

Table of Contents

Installation

Install the package via composer:

composer require l3aro/pipeline-query-collection

Optionally, you can publish the config file with:

php artisan vendor:publish --tag="pipeline-query-collection-config"

This is the contents of the published config file:

return [
    // key to detect param to filter
    'detect_key' => env('PIPELINE_QUERY_COLLECTION_DETECT_KEY', ''),

    // type of postfix for date filters
    'date_from_postfix' => env('PIPELINE_QUERY_COLLECTION_DATE_FROM_POSTFIX', 'from'),
    'date_to_postfix' => env('PIPELINE_QUERY_COLLECTION_DATE_TO_POSTFIX', 'to'),

    // default motion for date filters
    'date_motion' => env('PIPELINE_QUERY_COLLECTION_DATE_MOTION', 'find'),
];

Usage

Preparing your model

To use this collection with a model, you should implement the following interface and trait:

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Baro\PipelineQueryCollection\Concerns\Filterable;
use Baro\PipelineQueryCollection\Contracts\CanFilterContract;

class YourModel extends Model implements CanFilterContract
{
    use Filterable;

    public function getFilters(): array
    {
        return [
            // the filter and sorting that your model need
        ];
    }
}

After setup your model, you can use scope filter on your model like this

YourModel::query()->filter()->get();

You can also override the predefined filter lists in your model like this

YourModel::query()->filter([
    // the custom filter and sorting that your model need
])
->paginate();

Feature

Here the use all filter and sort in the collection

Bitwise filter

use Baro\PipelineQueryCollection\BitwiseFilter;

// users?permission[0]=2&permission[1]=4
User::query()->filter([
    new BitwiseFilter('permission'), // where permission & 6 = 6
]);

Boolean filter

use Baro\PipelineQueryCollection\BooleanFilter;

// users?is_admin=1
User::query()->filter([
    new BooleanFilter('is_admin'), // where is_admin = 1
]);

Date From filter

use Baro\PipelineQueryCollection\DateFromFilter;
use Baro\PipelineQueryCollection\Enums\MotionEnum;

// users?updated_at_from=2022-05-31
User::query()->filter([
    new DateFromFilter('updated_at'), // where updated_at >= 2022-05-31
    new DateFromFilter('updated_at', MotionEnum::TILL), // where updated_at > 2022-05-31
    // you can config default motion behavior and the postfix `from` in the config file
]);

Date To filter

use Baro\PipelineQueryCollection\DateToFilter;
use Baro\PipelineQueryCollection\Enums\MotionEnum;

// users?updated_at_to=2022-05-31
User::query()->filter([
    new DateToFilter('updated_at'), // where updated_at <= 2022-05-31
    new DateToFilter('updated_at', MotionEnum::TILL), // where updated_at < 2022-05-31
    // you can config default motion behavior and the postfix `to` in the config file
]);

Exact filter

use Baro\PipelineQueryCollection\ExactFilter;

// users?id=4
User::query()->filter([
    new ExactFilter('id'), // where id = 4
]);

Relation filter

use Baro\PipelineQueryCollection\RelationFilter;

// users?roles_id[0]=1&roles_id[1]=4
User::query()->filter([
    new RelationFilter('roles', 'id'), // where roles.id in(1,4)
]);

Relative filter

use Baro\PipelineQueryCollection\RelativeFilter;
use Baro\PipelineQueryCollection\Enums\WildcardPositionEnum;

// users?name=Baro
User::query()->filter([
    new RelativeFilter('name'), // where('name', 'like', "%Baro%")
    new RelativeFilter('name', WildcardPositionEnum::LEFT), // where('name', 'like', "%Baro")
    new RelativeFilter('name', WildcardPositionEnum::RIGHT), // where('name', 'like', "Baro%")
]);

Scope filter

filter([ new ScopeFilter('search'), // where (`id` = 'Baro' or `name` like '%Baro%') ]);">
// users?search=Baro

// User.php
public function scopeSearch(Builder $query, string $keyword)
{
    return $query->where(function (Builder $query)  use ($keyword) {
        $query->where('id', $keyword)
            ->orWhere('name', 'like', "%{$keyword}%");
    });
}

// Query
use Baro\PipelineQueryCollection\ScopeFilter;

User::query()->filter([
    new ScopeFilter('search'), // where (`id` = 'Baro' or `name` like '%Baro%')
]);

Trash filter

When using Laravel's soft delete, you can use the pipe TrashFilter to query these models. The default query name is trashed, and filters responds to particular values:

  • with: the query should be ?trashed=with to include soft deleted records to the result set
  • only: the query should be ?trashed=only to return only soft deleted records to the result set
  • any other value, or completely remove trashed from request query will return only records that are not soft deleted in the result set

You can change query name trashed by passing your custom name to the TrashFilter constructor

use Baro\PipelineQueryCollection\TrashFilter;


// ?removed=only
User::query()->filter([
   new TrashFilter('removed'), // where `deleted_at` is not null
]);

Sort

use Baro\PipelineQueryCollection\ScopeFilter;

// users?sort[name]=asc&sort[permission]=desc
User::query()->filter([
    new Sort(), //  order by `name` asc, `permission` desc
]);

Detector

Sometimes, you want to setup your request with a prefix like filter.. You can config every pipe that have it

use Baro\PipelineQueryCollection\ExactFilter;

// users?filter[id]=4&filter[permission][0]=1&filter[permission][1]=4
User::query()->filter([
    (new ExactFilter('id'))->detectBy('filter.'), // where id = 4
    (new BitwiseFilter('permission'))->detectBy('filter.'), // where permission & 5 = 5
]);

Or, you can define it globally

filter([ new ExactFilter('id'), // where id = 4 new BitwiseFilter('permission'), // where permission & 5 = 5 ]);">
// users?filter[id]=4&filter[permission][0]=1&filter[permission][1]=4

// .env
PIPELINE_QUERY_COLLECTION_DETECT_KEY="filter."

// Query
User::query()->filter([
    new ExactFilter('id'), // where id = 4
    new BitwiseFilter('permission'), // where permission & 5 = 5
]);

Custom search column

Sometimes, your request field is not the same with column name. For example, in your database you have column respond and want to perform some query against it, but for some reasons, your request query is reply instead of respond.

// users?reply=baro

User::query()->filter([
    (new RelativeFilter('reply'))->filterOn('respond'), // where respond like '%baro%'
]);

Extend filter

Yeah, you are free to use your own pipe. Take a look at some of my filters. All of them extends BaseFilter to have some useful properties and functions.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Comments
  • fix date filters on sqlite

    fix date filters on sqlite

    This PR updates the apply methods in both the DateToFilter and DateFromFilter to use eloquent's whereDate method, this will fix those wanting to run their test suits in Sqlite. This is due to the different way Sqlite handles filters with datetime and timestamp columns vs MySQL

    opened by joelbutcher 6
  • Use SQLite as default test database

    Use SQLite as default test database

    This PR switches the default testing database from MySQL to SQLite now that it is officially supported with #6.

    The reason for this is so that developers and other contributors don't need to download and setup a MySQL environment to be able to run test suites.

    Using SQLite as the default database engine for tests also improves the speed tests execute by ~1s (MySQL took 1.43 seconds vs 0.35s on SQLite using an M1 MacBook Pro)

    opened by joelbutcher 4
  • Bump ramsey/composer-install from 1 to 2

    Bump ramsey/composer-install from 1 to 2

    Bumps ramsey/composer-install from 1 to 2.

    Release notes

    Sourced from ramsey/composer-install's releases.

    2.0.0

    Added

    • Use --prefer-stable with lowest dependencies (#178)
    • Allow use of a custom cache key (#167)
    • Allow ability to ignore the cache

    Changed

    Fixed

    • Fix case where working-directory did not run composer install in the correct working directory (#187)
    • Fix problems with retrieving cache with parallel builds (#161, #152)
    • Fix problems restoring from cache on Windows (#79)

    1.3.0

    • Support passing --working-dir as part of composer-options

    1.2.0

    • Support Composer working-directory option for when composer.json is in a non-standard location.
    • Add operating system name to the cache key.

    1.1.0

    Display Composer output with ANSI colors.

    1.0.3

    Patch release for dependency updates.

    1.0.2

    • Use the GitHub cache action directly to avoid duplication of code/effort.
    • Turn on output of Composer command to provide feedback in the job log
    • Use Composer cache-dir instead of cache-files-dir

    1.0.1

    Rewrite and refactor as a JavaScript action.

    Commits
    • 83af392 :sparkles: Add new custom-cache-suffix option (#239)
    • 7f9021e Fix use of deprecated set-output command (#238)
    • 4617231 Tests: update the included composer.phar from v 2.2.2 to 2.2.18 (#237)
    • 72896eb Add dependabot configuration file (#227)
    • 69e970d GH Actions: version update for codecov action runner (#226)
    • e3612f6 GH Actions: version update for actions/cache (#224)
    • d515102 GH Actions: version update for various predefined actions (#222)
    • 6085843 GH Actions: re-work the integration tests (#221)
    • f680dac test: add PHP path back to command, as well as debug message
    • 3c51967 test: ensure we use the alternate composer location
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5

    Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5

    Bumps dependabot/fetch-metadata from 1.3.4 to 1.3.5.

    Release notes

    Sourced from dependabot/fetch-metadata's releases.

    v1.3.5

    What's Changed

    New Contributors

    Full Changelog: https://github.com/dependabot/fetch-metadata/compare/v1...v1.3.5

    Commits
    • 5ef0018 Merge pull request #282 from dependabot/v1.3.5-release-notes
    • a9380d2 v1.3.5
    • 404ba25 Merge pull request #280 from dependabot/drop-readme-from-bump-script
    • f40d4c7 Don't bump pin versions in README.md
    • 7db64c3 Merge pull request #252 from dependabot/document-release-steps
    • daa85e7 Add mention of npm run build if dev deps need updating.
    • b768c40 Document steps for cutting a new release
    • 9833f74 Merge pull request #273 from dependabot/dependabot/npm_and_yarn/yargs-and-typ...
    • 32b7ed3 Bump yargs and @​types/yargs
    • 7942397 Merge pull request #271 from dependabot/dependabot/npm_and_yarn/actions/githu...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Bump dependabot/fetch-metadata from 1.3.3 to 1.3.4

    Bump dependabot/fetch-metadata from 1.3.3 to 1.3.4

    Bumps dependabot/fetch-metadata from 1.3.3 to 1.3.4.

    Release notes

    Sourced from dependabot/fetch-metadata's releases.

    v1.3.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/dependabot/fetch-metadata/compare/v1.3.3...v1.3.4

    Commits
    • bfc19f4 v1.3.4
    • 4367f58 Merge pull request #258 from dependabot/dependabot/npm_and_yarn/yaml-2.1.1
    • 00ab600 Manually bump dist/
    • bdbe81d Bump yaml from 2.0.1 to 2.1.1
    • 5fc325a Merge pull request #257 from dependabot/dependabot/npm_and_yarn/typescript-4.8.3
    • c91309c Bump typescript from 4.6.3 to 4.8.3
    • 264d039 Merge pull request #266 from dependabot/dependabot/npm_and_yarn/ts-node-10.9.1
    • d1cd6ed Bump ts-node from 10.7.0 to 10.9.1
    • e3cb77e Merge pull request #265 from dependabot/dependabot/npm_and_yarn/actions/githu...
    • e462341 [dependabot skip] Update dist/ with build changes
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Bump dependabot/fetch-metadata from 1.3.1 to 1.3.3

    Bump dependabot/fetch-metadata from 1.3.1 to 1.3.3

    Bumps dependabot/fetch-metadata from 1.3.1 to 1.3.3.

    Release notes

    Sourced from dependabot/fetch-metadata's releases.

    v1.3.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/dependabot/fetch-metadata/compare/v1.3.2...v1.3.3

    v1.3.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/dependabot/fetch-metadata/compare/v1.3.1...v1.3.2

    Commits
    • 605e039 Merge pull request #233 from dependabot/v1.3.3-release-notes
    • e0f3842 v1.3.3
    • ac6adf8 Merge pull request #232 from jsok/patch-1
    • 15259f7 action.yaml: fix skip-commit-verification quoting
    • 90ed90d Merge pull request #226 from dependabot/v1.3.2-release-notes
    • 28b141f v1.3.2
    • cfb7274 Merge pull request #225 from dependabot/brrygrdn/skip-commit-verification
    • 6c87543 Bump dist/
    • d882a80 Update documentation
    • b1673a7 Add skip-commit-verification input
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Use eloquent when checking asserting that the query was executed

    Use eloquent when checking asserting that the query was executed

    When using an Sqlite database for testing, some calls for assertQueryExecuted fail because the query structure in Sqlite is different to MySQL. For example, in the following query, Laravel will use backticks to escape database tables and columns, but in Sqlite, it uses double quotes:

    -- MySQL
    select * from `test_models` where `test_models`.`deleted_at` is null order by `name` asc
    
    -- Sqlite
    select * from "test_models" where "test_models"."deleted_at" is null order by "name" asc
    

    This PR updates all tests in SortTest.php to use the query built by eloquent at runtime, passing it to assertQueryExecuted($query)

    opened by joelbutcher 1
  • Control relative filter wildcard position via .env

    Control relative filter wildcard position via .env

    Hello!

    Firstly, thank you for this package - it makes it very simple and easy to create lots of nice filters for my Laravel applications!

    This PR adds the ability for developers to control the default wildcard position via the .env file, by adding the following code to the published config file:

    'relative_wildcard_position' => WildcardPositionEnum::tryFrom(
        env('PIPELINE_QUERY_COLLECTION_WILDCARD_POSITION', 'both')
    ),
    

    The main reason for this is to reduce the burden and time for developers to update this default behaviour, without having to push out a code change.

    opened by joelbutcher 1
  • The process has been signaled with signal

    The process has been signaled with signal "11". for Dates filters

    <?php
     
    namespace Modules\Branches\Scopes;
    
    use Baro\PipelineQueryCollection\BooleanFilter;
    use Baro\PipelineQueryCollection\DateFromFilter;
    use Baro\PipelineQueryCollection\DateToFilter;
    use Baro\PipelineQueryCollection\RelationFilter;
    use Baro\PipelineQueryCollection\ScopeFilter;
    use Illuminate\Database\Eloquent\Builder;
    use Illuminate\Database\Eloquent\Model;
    use Illuminate\Database\Eloquent\Scope;
     
    class BranchScope implements Scope
    {
        /**
         * Apply the scope to a given Eloquent query builder.
         *
         * @param \Illuminate\Database\Eloquent\Builder $builder
         * @param \Illuminate\Database\Eloquent\Model $model
         * @return void
         */
        public function apply(Builder $builder, Model $model)
        {
            $builder->filter([
                new ScopeFilter('search'),
                new RelationFilter('manager', 'id'),
                new BooleanFilter('status'),
                new DateFromFilter('created_at'),
                new DateToFilter('created_at'),
            ]);
        }
    
        
    }
    
    

    an error

    Symfony\Component\Process\Exception\ProcessSignaledException

    The process has been signaled with signal "11".

    at vendor/symfony/process/Process.php:434 430▕ usleep(1000); 431▕ } 432▕ 433▕ if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) { ➜ 434▕ throw new ProcessSignaledException($this); 435▕ } 436▕ 437▕ return $this->exitcode; 438▕ }

      +15 vendor frames 
    

    16 artisan:37

    opened by karimalihussein 5
Releases(v1.3.0)
  • v1.3.0(Jun 12, 2022)

    What's Changed

    • Default value relative wildcard operator position config in #3 , thanks to @joelbutcher
    • SQLite covered in #4 #5 , thanks to @joelbutcher
    • [Posible Breaking Change] I change the definition of apply method, now take zero params and return static. If you have custom pipe that extends my BaseFilter, please take some actions for the apply logic. Check #6 for more details @l3aro
    <?php
    
    // old
    protected function apply(Builder $query): Builder {}
    
    // new
    protected function apply(): static {}
    

    New Contributors

    • @joelbutcher made their first contribution in #3
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jun 10, 2022)

    What's Changed

    • Finally, test works 🎉🎉
    • Add new TrashFilter pipe to perform query against Laravel's Soft Delete
    • Fix DateToFilter's query name
    • Add custom postfix of query date DateFromFilter and DateToFilter
    • Fix RelationFilter's method name should be camelCase
    • Fix RelativeFilter's query name
    • Improve BitwiseFilter @l3aro
    Source code(tar.gz)
    Source code(zip)
A package to filter laravel model based on query params or retrieved model collection

Laravel Filterable A package to filter laravel model based on query params or retrived model collection. Installation Require/Install the package usin

Touhidur Rahman 17 Jan 20, 2022
A simple to use query builder for the jQuery QueryBuilder plugin for use with Laravel.

QueryBuilderParser Status Label Status Value Build Insights Code Climate Test Coverage QueryBuilderParser is designed mainly to be used inside Laravel

Tim Groeneveld 149 Nov 11, 2022
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell

PHPAlgorithms A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDow

Doğan Can Uçar 921 Dec 18, 2022
Update multiple Laravel Model records, each with it's own set of values, sending a single query to your database!

Laravel Mass Update Update multiple Laravel Model records, each with its own set of values, sending a single query to your database! Installation You

Jorge González 88 Dec 31, 2022
Collection of the Laravel/Eloquent Model classes that allows you to get data directly from a Magento 2 database.

Laragento LAravel MAgento Micro services Magento 2 has legacy code based on abandoned Zend Framework 1 with really ugly ORM on top of outdated Zend_DB

Egor Shitikov 87 Nov 26, 2022
The query filter bundle allows you to filter data from QueryBuilder and the Database.

The query filter bundle allows you to filter data from QueryBuilder and the Database. you can filter multiple columns at the same time and also you can filter relation fields with two-level deep and without any join in your query builder.

Bugloos 15 Dec 29, 2022
Laravel router extension to easily use Laravel's paginator without the query string

?? THIS PACKAGE HAS BEEN ABANDONED ?? We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore.

Spatie 307 Sep 23, 2022
Use Laravel's built-in ORM classes to query cloud resources with Steampipe.

Laravel Steampipe Use Laravel's built-in ORM classes to query cloud resources with Steampipe, an open source CLI to instantly query cloud APIs using S

Renoki Co. 13 Nov 8, 2022
Collection of classes you can use to standardize data formats in your Laravel application.

Laravel Formatters This package is a collection of classes you can use to standardize data formats in your Laravel application. It uses the Service Co

Michael Rubel 88 Dec 23, 2022
A collection of helper functions that I use across my projects.

A collection of helper functions that I use across my projects. This package includes some of the helper functions that I tend to use in all of my pro

Ryan Chandler 33 Oct 18, 2022
Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Collection of agnostic PHP Functions and helpers This package provides a lot of very usefull agnostic helpers to use as foundation in packages and oth

padosoft 54 Sep 21, 2022
A collection of easy-to-use filters with clause conditions to Filament

Filament Advanced Filter A collection of easy-to-use filters with clause conditions to Filament Installation Install the package via composer (require

Webbing Brasil 45 Jan 2, 2023
Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries

Laravel Query Helper Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries, this package will contain all advanced SQL

Syrian Open Source 15 Nov 20, 2022
A Laravel wrapper for spatie/dns. Allows to query and validate DNS records.

A Laravel wrapper for spatie/dns. Allows to query and validate DNS records.

Astrotomic 22 Nov 17, 2022
Provides a Eloquent query builder for Laravel or Lumen

This package provides an advanced filter for Laravel or Lumen model based on incoming requets.

M.Fouladgar 484 Jan 4, 2023
Laravel basic Functions, eloquent cruds, query filters, constants

Emmanuelpcg laravel-basics Description Package with basic starter features for Laravel. Install If Builder Constants Install composer require emmanuel

Emmanuel Pereira Pires 3 Jan 1, 2022
A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

Laravel MongoDB This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API. This library ex

Jens Segers 6.3k Jan 7, 2023
Enable/disable query logger in Laravel/Lumen

Enable/disable query logger in Laravel/Lumen

Ngoc Linh Pham 5 Nov 2, 2022
A DynamoDB based Eloquent model and Query builder for Laravel.

Laravel DynamoDB A DynamoDB based Eloquent model and Query builder for Laravel. You can find an example implementation in kitar/simplechat. Motivation

Satoshi Kita 146 Jan 2, 2023