2017 © Pedro Peláez
 

library laravel-filterable

A Laravel trait that handles filtering through request variables.

image

koenhoeijmakers/laravel-filterable

A Laravel trait that handles filtering through request variables.

  • Tuesday, July 10, 2018
  • by koenhoeijmakers
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,420 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 126 % Grown

The README.md

Laravel Filterable

Build Packagist Packagist license, (*1)

A Laravel package to implement filtering by request parameters., (*2)

example.com/json?name=Koen&sortBy=name&desc=0

Usage

Require the package., (*3)

composer require koenhoeijmakers/laravel-filterable

Inject it in your controller (or resolve it from the container in any other way)., (*4)


namespace App\Http\Controllers\Api\User; use KoenHoeijmakers\LaravelFilterable\Contracts\Filtering; final class Index { public function __construct( private readonly Filtering $filtering ) {} public function __invoke() { $builder = User::query(); $this->filtering->builder($builder) ->filterFor('name', fn(Builder $builder, string $value) => $builder ->where('name', 'like', "{$value}%"); ) ->sortFor('name') ->defaultSorting('name') ->filter(); return UserResource::collection($builder->paginate()); } }

The Versions

10/07 2018

dev-master

9999999-dev

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

10/07 2018

v3.0.0

3.0.0.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

29/06 2018

v2.0.2

2.0.2.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

06/06 2018

v2.0.1

2.0.1.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

02/06 2018

v2.0.0

2.0.0.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

30/05 2018

dev-2.x-dev

dev-2.x-dev

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

28/05 2018

dev-2.x-dev-tests

dev-2.x-dev-tests

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Hoeijmakers

11/05 2018

v1.0.4

1.0.4.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

09/05 2018

v1.0.3

1.0.3.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

12/04 2018

v1.0.2

1.0.2.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

11/04 2018

v1.0.1

1.0.1.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

15/02 2018

1.0.0

1.0.0.0

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers

08/11 2017

1.0-rc1

1.0.0.0-RC1

A Laravel trait that handles filtering through request variables.

  Sources   Download

MIT

The Requires

 

by Koen Hoeijmakers