PHP code example of mnabialek / laravel-eloquent-filter
1. Go to this page and download the library: Download mnabialek/laravel-eloquent-filter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mnabialek / laravel-eloquent-filter example snippets
composer
use \Mnabialek\LaravelEloquentFilter\Traits\Filterable;
class User extends Authenticatable
{
use \Mnabialek\LaravelEloquentFilter\Traits\Filterable;
namespace App\Filters;
use Mnabialek\LaravelEloquentFilter\Filters\SimpleQueryFilter;
class UserFilter extends SimpleQueryFilter
{
protected $simpleFilters = ['id','created_at'];
protected $simpleSorts = ['id','email','created_at'];
}