How to get user agent value in Laravel 5?By Hardik Savani | April 5, 2016 | | 4212 Viewer | Category : Laravel
Share this post:
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 send mail example in Laravel 5?
- How to check request is Ajax or not in Laravel 5?
- How to install laravel framework on windows xampp server from scratch?
- Laravel 5 Twitter OAuth using Socialite Package
- Laravel 5 - Generate Captcha code and Validation example using BotDetect package
- How to implement lazy loading image with example for your website?
- How to get current url with query string in codeigniter?
- How to check if file exists or not in Laravel 5?