composer require prettus/laravel-fiql-parser:dev-main
use Illuminate\Support\Facades\DB;
$query = DB::table('users')->filter('last_name==foo');
print_r($query->toSql());
// select * from `users` where `last_name` = ?
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
protected $table = 'users';
}
$query = User::query()->filter('last_name==foo');
print_r($query->toSql());
// select * from `users` where `last_name` = ?