How to get user agent value in Laravel 5?By Hardik Savani | April 5, 2016 | | 9679 Viewer | Category : Laravel
If you are work on laravel 5 application and you require to get user agent(user agent mean user browser details like firefox, cherome etc) then you can get easy. you don't need to use $_SERVER variable like native PHP, but laravel 5 provide Request facade. you can fetch easy using following example:
public function ImpressionCount(Request $request)
$impre['useragent'] = $request->server('HTTP_USER_AGENT');
$input['ip'] = $request->ip();
- How to create ban/revoke user functionality in Laravel 5 example ?
- How to create snippets in sublime ?
- Laravel 5.5 CRUD Example from scratch
- How to use login throttle in laravel 5?
- Laravel 5.3 new feature and update - $loop variable
- How to copy to clipboard without flash in AngularJS ?
- How to add query string automatically on laravel pagination links ?
- How to insert multiple records in Laravel 5?