How to get user agent value in Laravel 5?By Hardik Savani | April 5, 2016 | | 2255 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 create custom facade in laravel 5.2?
- JQuery - Delete confirm modal using bootbox example
- Laravel 5.3 Image Upload with Validation example
- How to resolve - tokenmismatchexception in verifycsrftoken.php Laravel 5 Ajax ?
- How to set Datepicker in bootstrap?
- Select box with search option example in Jquery using Chosen Plugin
- How to make simple dependent dropdown using jquery ajax in Laravel 5?
- Solved - fatal: Failed to connect to bitbucket.org port 443: Network is unreachable