Refactor for created_at query

This commit is contained in:
David Bomba 2022-12-21 17:45:38 +11:00
parent bc1f4bd2f8
commit ad57700a41

View File

@ -176,15 +176,21 @@ abstract class QueryFilters
public function created_at($value = '')
{
if($value == '')
return $this->builder;
try{
$created_at = Carbon::parse($value);
return $this->builder->where('created_at', '>=', $created_at);
}
catch(\Exception $e) {
return $this->builder;
}
}