title: Get useragent in controller laravel 5 php
body: <p>I am using laravel 5.0. How do I get the user agent from $request in a controller ?</p>
  
  <pre><code>public function index(Request $request)
  {
      $useragent = $request-&gt;userAgent; // ????
      return $useragent;
  }
  </code></pre>