You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the package attempts get the request's user agent it fails, as the Request object that is a part of Illuminate/Http 5.2 does not contain a userAgent method.
The error received is:
BadMethodCallException in Macroable.php line 74: Method userAgent does not exist.
in Macroable.php line 74
at Request->__call('userAgent', array()) in Facade.php line 215
at Facade::__callStatic('userAgent', array()) in UserAgentResolver.php line 26
at UserAgentResolver::resolve()
at call_user_func(array('OwenIt\Auditing\Resolvers\UserAgentResolver', 'resolve')) in Auditable.php line 334
Expected Behaviour
User agent for the request is successfully retrieved, and audit is correctly logged.
Steps to Reproduce
Attempt to create/update/delete a model, while using v6.0.1 of the package in Laravel 5.2 will reproduce the problem.
Possible Solutions
In order to maintain compatibility with Laravel 5.2, the resolve() method in the UserAgentResolver class will need to be modified to not use the non-existant Request::userAgent() method.
An alternative is to just use Request::header('User-Agent').
The text was updated successfully, but these errors were encountered:
Actual Behaviour
When the package attempts get the request's user agent it fails, as the
Request
object that is a part ofIlluminate/Http
5.2 does not contain auserAgent
method.The error received is:
Expected Behaviour
User agent for the request is successfully retrieved, and audit is correctly logged.
Steps to Reproduce
Attempt to create/update/delete a model, while using v6.0.1 of the package in Laravel 5.2 will reproduce the problem.
Possible Solutions
In order to maintain compatibility with Laravel 5.2, the
resolve()
method in theUserAgentResolver
class will need to be modified to not use the non-existantRequest::userAgent()
method.An alternative is to just use
Request::header('User-Agent')
.The text was updated successfully, but these errors were encountered: