samrap/laravel-sift

Sensible key-value query filtering for your Laravel application.

v0.1.1 2017-10-20 20:36 UTC

This package is not auto-updated.

Last update: 2024-12-22 05:55:26 UTC


README

Sensible key-value query filtering for your Laravel application.

Build Status

Basic example:

<?php

namespace App\Http\Controllers;

use App\User;
use Illuminate\Http\Request;
use Samrap\Sift\QueryFilters;
use App\Http\Controllers\Controller;

class UsersController extends Controller
{
    public function index(Request $request)
    {
        $filters = new QueryFilters($request->all());

        return response()->json(User::sift($filters)->get());
    }
}

Installation

Laravel Sift is available on Packagist:

composer require samrap/laravel-sift

Usage

Coming soon.