Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how i can set custom agent #186

Open
vahidalvandi opened this issue Mar 15, 2021 · 1 comment
Open

how i can set custom agent #186

vahidalvandi opened this issue Mar 15, 2021 · 1 comment

Comments

@vahidalvandi
Copy link

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 ??

@jangaraev
Copy link

jangaraev commented May 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants