Merge branch 'trunk'
This commit is contained in:
commit
30cbcb59bd
1 changed files with 4 additions and 4 deletions
|
|
@ -288,12 +288,12 @@ class Employee extends Authenticatable
|
|||
$now = Carbon::now()->format('Y/m/d');
|
||||
$nowPlus7 = Carbon::now()->addDays(7)->format('Y/m/d');
|
||||
return collect([
|
||||
'now' => Planning::whereDate('start', '<', $now)
|
||||
->whereDate('end', '>', $now)
|
||||
'now' => Planning::whereDate('start', '<=', $now)
|
||||
->whereDate('end', '>=', $now)
|
||||
->where('employee_id', $this->id)
|
||||
->first(),
|
||||
'next' => Planning::whereDate('start', '<', $nowPlus7)
|
||||
->whereDate('end', '>', $nowPlus7)
|
||||
'next' => Planning::whereDate('start', '<=', $nowPlus7)
|
||||
->whereDate('end', '>=', $nowPlus7)
|
||||
->where('employee_id', $this->id)
|
||||
->first()
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue