public function isDesktop($userAgent = null, $httpHeaders = null)
{
return !$this->isMobile() && !$this->isTablet() && !$this->isRobot();
}
public function detectDevice() { // @ https://github.com/jenssegers/agent $agent = new Agent(); if ($agent->isMobile() || $agent->isTablet()) { if ($agent->is('android')) { return 'android'; } if ($agent->is('iOS')) { return 'ios'; } return $agent->platform(); } if ($agent->isDesktop()) { if ($agent->is('Windows')) { return 'windows'; } if ($agent->is('OS X')) { return 'OSX'; } return 'desktop'; } }