Overview of upcoming events
This commit is contained in:
@@ -64,7 +64,14 @@ class EventResource extends JsonResource{
|
||||
ParticipationType::PARTICIPATION_TYPE_VOLUNTEER,
|
||||
ParticipationType::PARTICIPATION_TYPE_OTHER,
|
||||
] as $participationType) {
|
||||
$returnArray['participants'][$participationType] = $this->getParticipants($participationType);
|
||||
$_t =$this->getParticipants($participationType);
|
||||
$returnArray['participants'][$participationType] = $_t;
|
||||
$returnArray['count' . ucfirst($participationType)] = $_t['count'];
|
||||
}
|
||||
|
||||
$returnArray['nameShort'] = $returnArray['name'];
|
||||
if (strlen($returnArray['nameShort']) > 15) {
|
||||
$returnArray['nameShort'] = substr($returnArray['nameShort'], 8, 13) . '...';
|
||||
}
|
||||
|
||||
$returnArray['costUnit'] = new CostUnitResource($this->event->costUnit()->first())->toArray(true);
|
||||
|
||||
Reference in New Issue
Block a user