mobileDetect.. Расскажи по порядку:
                  
                  
                  
                  
                  
                  1) Подключил https://github.com/suncat2000/MobileDetectBundle
                  
                  
                  2) В композере запись   "suncat/mobile-detect-bundle": "1.1.1", 
                  
                  
                  3) В /config/packages сгенерился файл mobile_detect.yaml
                  
                  
                  4) В mobile_detect.yaml указал
                  
                  
                  mobile_detect:
                  
                  
                      service:
                  
                  
                          mobile_detector: mobile_detect.mobile_detector.default
                  
                  
                      cookie_key: "device_view"                     # default
                  
                  
                      cookie_expire_datetime_modifier: "+1 month"   # default
                  
                  
                      switch_param: "device_view"                   # default
                  
                  
                  
                  
                  
                  Вроде как все, но при попытке в любом контроллере вызвать(по инструкции) сервис определения устройства
                  
                  
                  $device = $this->get('mobile_detect.mobile_detector');
                  
                  
                  
                  
                  
                  Получаю ошибку о том что сервис не подключен:
                  
                  
                  Service "mobile_detect.mobile_detector" not found: even though it exists in the app's container, the container inside "App\Controller\EventsController" ....
                  
                  
                  
                  
                  
                  Помогите пожалуйста понять, что я упускаю?
                  
                  
                
ты упускаешь ошибку.
Обсуждают сегодня