jenssegers / jenssegers/agent

Call to undefined method

Open
#55 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4.9k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

With Laravel 5 and Jenssegers installed you get this error:

```
Call to undefined method Jenssegers\Agent\Facades\Agent::platform()
```

Request code:

```
$agent = new \Agent;
return $agent->platform();
```

If I call it statically it returns false.

```
return \Agent::browser($request->header('user-agent'));
```

Note: this is a clean install with the latest Lavarvel 5.2.x and jenssegers/agent (v2.3.3)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported calls in a clean Laravel 5.2.x installation with jenssegers/agent v2.3.3. Trace how the Agent facade and instance resolve platform() and browser(), then verify that the documented usage no longer raises an undefined-method error and that the static call returns the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.