1. Go to this page and download the library: Download aminsamadzadeh/simorgh 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/ */
aminsamadzadeh / simorgh example snippets
namespace App;
use Illuminate\Database\Eloquent\Model;
use AminSamadzadeh\Simorgh\Filterable;
class User extends Model
{
use Filterable;
}
namespace App;
use Illuminate\Database\Eloquent\Model;
use AminSamadzadeh\Simorgh\Filterable;
class User extends Model
{
use Filterable;
protected $filterable = ['name', 'email'];
}
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\User;
class UserController extends Controller
{
public function index()
{
$users = User::filter(request()->all())->get();
return view('users.index', compact('users'));
}
}
namespace App;
use Illuminate\Database\Eloquent\Model;
use AminSamadzadeh\Simorgh\Filterable;
class User extends Model
{
use Filterable;
protected $filterable = ['name', 'email'];
protected $filterMeta = ['name' => ['op' => 'like']];
}
.
.
.
class User extends Model
{
use Filterable;
protected $filter_name = 'f';
protected $filter_meta = 'fm';
}
/users?filter[created_at]=(1970-01-01,1970-02-01)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.