Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flavianohonorato/laravel-filters

A Laravel package to make it easy to consult eloquent
https://github.com/flavianohonorato/laravel-filters

eloquent eloquent-filters eloquent-orm laravel laravel-filters php

Last synced: about 2 months ago
JSON representation

A Laravel package to make it easy to consult eloquent

Awesome Lists containing this project

README

        

## Laravel package to make it easy to consult eloquente

- Install:

```
composer require wicool/laravel-filters
```

## How to use:

- Model `app/Models/User.php`
```php
filter($request->all())->get();

return $users;
}
}
```

- The return will be something like:
```
/users?name=Fulaninho&[email protected]?phone=999999999&status=true

SELECT * FROM users WHERE name = 'Fulaninho' AND email = '[email protected]' AND status = true
```