How to get user agent value in Laravel 5?By Hardik Savani | April 5, 2016 | | 8070 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 get site URL in Laravel 5?
- How to solve 'There are no commands defined in the "cashier" namespace' in Laravel 5
- laravel 5.4 New Feature - Add eloquent whereKey method
- Laravel guzzle http client POST request example
- How to use login throttle in laravel 5?
- PHP Script - Login with Facebook using facebook-php-sdk and MySQL example with demo
- How to get last executed mysql query in laravel ?
- How to make read more link from string in PHP?