mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Refactor for created_at query
This commit is contained in:
parent
bc1f4bd2f8
commit
ad57700a41
@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user