agent icon indicating copy to clipboard operation
agent copied to clipboard

how i can set custom agent

Open vahidalvandi opened this issue 3 years ago • 1 comments

i need custom agent with name mobile web view app because i need hidden same menu in mobile web view and show in mobile browser ??

vahidalvandi avatar Mar 15 '21 14:03 vahidalvandi

You can always pass the user-agent string on class instantiation, like this:

use Jenssegers\Agent\Agent;

$agent = new Agent(null, 'mobile web view app');

also, there is another option to pass custom user-agent to specific methods:

$agent = app()->make('agent');
// $agent = \Illuminate\Support\Facades\App::make('agent');

$isMobile = Agent::isMobile('mobile web view app'); // your custom user-agent string

Hope I get your requirement right.

jangaraev avatar May 18 '22 07:05 jangaraev