src/Services/CalendarEventsService.php
public function getCalendarEvent($id)
    {
        /** @var Models\CalendarEvent $calendarEvent */
        $calendarEvent = null;

        $cache = $this->cache;

        if ($cache::has(self::CACHE_KEY.$id)) {
            return $cache::get(self::CACHE_KEY.$id);
        }

        $calendarEvent = $this->calendarEvent
            ->with(['calendarEventRepeatDates'])
            ->where('id', $id)
            ->firstOrFail()
        ;

        $cache::put(self::CACHE_KEY.$id, $calendarEvent, $this->cacheTimeToLive);

        return $calendarEvent;
    }
public function getCalendarEvent($id)
    {
        /** @var Models\CalendarEvent $calendarEvent */
        $calendarEvent = null;

        $cache = $this->cache;

        if ($cache::has(self::CACHE_KEY.$id)) {
            return $cache::get(self::CACHE_KEY.$id);
        }

        $calendarEvent = $this->calendarEvent
            ->with(['calendarEventRepeatDates'])
            ->where('id', $id)
            ->firstOrFail()
        ;

        $cache::put(self::CACHE_KEY.$id, $calendarEvent, $this->cacheTimeToLive);

        return $calendarEvent;
    }
Gets an calendar event based on id

@param int $id

@return Models\CalendarEvent