month
This commit is contained in:
parent
b47c0e1e01
commit
c1d41f7b73
@ -76,7 +76,9 @@ class FlowPoolRepository extends Repository
|
|||||||
if (isset($conditions['month'])) {
|
if (isset($conditions['month'])) {
|
||||||
$time = Carbon::parse($conditions['month'])->format('Y-m-d H:i:s');
|
$time = Carbon::parse($conditions['month'])->format('Y-m-d H:i:s');
|
||||||
$this->model = $this->model->where(function ($subQuery) use ($time) {
|
$this->model = $this->model->where(function ($subQuery) use ($time) {
|
||||||
$subQuery->where('start_at', '<=', $time)->where('end_at', '>=', $time);
|
$subQuery->where('start_at', '<=', $time)->where(function ($endAtQuery) use ($time) {
|
||||||
|
$endAtQuery->where('end_at', '>=', $time)->orWhereNull('end_at');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user