vendredi 5 juin 2020

How to get access the values of object which are starting from # in laravel dd(); php?

I used this "mobiledetect/mobiledetectlib": "^2.8" pkg of laravel for device detection and want to print the userAgent value.I call this method

$this->device = new MobileDetect();
dd($this->device)

After that i got this result: enter image description here

now i want to print userAgent value. I have tried these code but not working.

dd($this->device->userAgent,$this->device["userAgent"]);


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire