Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17de41dc57 | ||
|
|
d2eaccaf93 |
@@ -4,8 +4,6 @@ when@prod:
|
|||||||
register_error_handler: true # Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK
|
register_error_handler: true # Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK
|
||||||
|
|
||||||
options:
|
options:
|
||||||
release: '%app.version%'
|
|
||||||
environment: '%env(APP_ENV)%'
|
|
||||||
traces_sample_rate: 1
|
traces_sample_rate: 1
|
||||||
profiles_sample_rate: 1
|
profiles_sample_rate: 1
|
||||||
attach_stacktrace: true
|
attach_stacktrace: true
|
||||||
|
|||||||
@@ -29,10 +29,13 @@ class CalendarController extends AbstractController
|
|||||||
|
|
||||||
$monitors = $monitorRepository->whereAirDateNotNull();
|
$monitors = $monitorRepository->whereAirDateNotNull();
|
||||||
$calendar->event(Map::from($monitors)->map(function (Monitor $monitor) {
|
$calendar->event(Map::from($monitors)->map(function (Monitor $monitor) {
|
||||||
return new Event($monitor->getTitle())
|
$event = new Event($monitor->getTitle())
|
||||||
->startsAt($monitor->getAirDate())
|
->startsAt($monitor->getAirDate())
|
||||||
->attachment($monitor->getPoster())
|
|
||||||
->fullDay();
|
->fullDay();
|
||||||
|
if (null !== $monitor->getPoster()) {
|
||||||
|
$event->attachment($monitor->getPoster());
|
||||||
|
}
|
||||||
|
return $event;
|
||||||
})->toArray());
|
})->toArray());
|
||||||
|
|
||||||
return new Response($calendar->get(), 200, [
|
return new Response($calendar->get(), 200, [
|
||||||
|
|||||||
Reference in New Issue
Block a user