public function getDeviceType()
    {
        $device = $this->session->get('device');

        if (empty($device)) {

            $detector = $this->getLibrary();

            if ($detector->isMobile()) {
                $device = 'mobile';
            } else if ($detector->isTablet()) {
                $device = 'tablet';
            } else {
                $device = 'desktop';
            }

            $this->session->set('device', $device);
        }

        return $device;
    }