Fouladgar.dev shows us how to use Eloquent-Builder to build useful eloquent queries in Laravel 5.

eloquent queries builder

Make your Laravel's query filter with the cleanest code!

Quick Usage

<?php

namespace App\Http\Controllers;

use App\User;
use EloquentBuilder;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function index(Request $request)
    {
        $users = EloquentBuilder::to(User::class, $request->all());

        return $users->get();
    }
}