event - update mapado infos on update
This commit is contained in:
parent
6df3927970
commit
c1a94e832f
10 changed files with 215 additions and 11 deletions
|
|
@ -85,6 +85,7 @@ return [
|
|||
$startTime = substr($session->startDate, 11, 5);
|
||||
$eventDateId = explode('/', $session->{'@id'});
|
||||
$eventDateId = $eventDateId[count($eventDateId) - 1];
|
||||
$ticketingUrl = 'https://cdn-besancon.mapado.com/event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId;
|
||||
|
||||
if (isset($session->endDate) && !$duration) {
|
||||
$endTime = substr($session->endDate, 11 , 5);
|
||||
|
|
@ -95,17 +96,19 @@ return [
|
|||
"day" => $day,
|
||||
"time" => str_replace(':', 'h', $startTime),
|
||||
"duration" => $duration,
|
||||
"ticketingUrl" => 'https://cdn-besancon.mapado.com/event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId
|
||||
"ticketingUrl" => $ticketingUrl
|
||||
]);
|
||||
|
||||
$sessionsToSave[] = [
|
||||
"date" => substr($session->startDate, 0, 10),
|
||||
"time" => str_replace(':', 'h', $startTime)
|
||||
"time" => str_replace(':', 'h', $startTime),
|
||||
"ticketingUrl" => $ticketingUrl
|
||||
];
|
||||
}
|
||||
}
|
||||
$event->update([
|
||||
"sessions" => $sessionsToSave
|
||||
"remoteDuration" => $duration,
|
||||
"remoteSessions" => $sessionsToSave
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue