Detect Mobile Device Laravel

[Solved] Detect Mobile Device Laravel | Shell - Code Explorer | yomemimo.com
Question : mobile detect in laravel

Answered by : sheikh-sohanur-rahman

@if ($agent->isMobile()) Show mobile stuff...
@endif
//Follow this link for full metod
// https://github.com/jenssegers/agent

Source : https://github.com/jenssegers/agent | Last Update : Sun, 20 Feb 22

Question : detect mobile device laravel

Answered by : sheikh-sohanur-rahman

<?php
use Jenssegers\Agent\Agent as Agent;
$Agent = new Agent();
// agent detection influences the view storage path
if ($Agent->isMobile()) { // you're a mobile device $viewPath = __DIR__.'/../mobile';
} else { // you're a desktop device, or something similar $viewPath = __DIR__.'/../views';
}
return array( 'paths' => array($viewPath), .....

Source : https://stackoverflow.com/questions/23779088/laravel-detect-mobile-tablet-and-load-correct-views | Last Update : Fri, 18 Feb 22

Answers related to detect mobile device laravel

Code Explorer Popular Question For Shell