app/Handlers/Calendar/Separated.php 1 location
|
@@ 8-19 (lines=12) @@
|
| 5 |
|
use Illuminate\Database\Eloquent\Collection; |
| 6 |
|
use SET\User; |
| 7 |
|
|
| 8 |
|
class Separated extends CollectionList |
| 9 |
|
{ |
| 10 |
|
|
| 11 |
|
public function getList() : Collection |
| 12 |
|
{ |
| 13 |
|
return User::where(function ($q) { |
| 14 |
|
$q->where('status', 'separated')->orWhere('status', 'destroyed'); |
| 15 |
|
}) |
| 16 |
|
->whereBetween('destroyed_date', [$this->start, $this->end]) |
| 17 |
|
->get(); |
| 18 |
|
} |
| 19 |
|
} |
app/Handlers/Calendar/TrainingUsers.php 1 location
|
@@ 8-19 (lines=12) @@
|
| 5 |
|
use Illuminate\Database\Eloquent\Collection; |
| 6 |
|
use SET\TrainingUser; |
| 7 |
|
|
| 8 |
|
class TrainingUsers extends CollectionList |
| 9 |
|
{ |
| 10 |
|
|
| 11 |
|
public function getList() : Collection |
| 12 |
|
{ |
| 13 |
|
return TrainingUser::with('user', 'training') |
| 14 |
|
->whereBetween('due_date', [$this->start, $this->end]) |
| 15 |
|
->whereNull('completed_date') |
| 16 |
|
->orderBy('training_id') |
| 17 |
|
->get(); |
| 18 |
|
} |
| 19 |
|
} |