Hello!
I use latest package version on laravel 5.8. I have date field in my db table and two input fields date_start and date_end and need to filter data where date between date_start and date_end
According to a filter logic I need to declare method date in my model filter like this (for more or equal for example)
<?php
namespace App\ModelFilters;
use EloquentFilter\ModelFilter;
class CardFilter extends ModelFilter
{
public $relations = [];
public function date()
{
return $this->where('date','>=',Carbon::parse($this->input('date_start'))->format('Y-m-d'));
}
}
But how to declare method which will filter by date between ``date_startanddate_end``` input values?
Hello! I use latest package version on laravel 5.8. I have
date
field in my db table and two input fieldsdate_start
anddate_end
and need to filter data wheredate
betweendate_start
anddate_end
According to a filter logic I need to declare method
date
in my model filter like this (for more or equal for example)But how to declare method which will filter by
date
between ``date_startand
date_end``` input values?Thanks!