title: Laravel 5 image resize
body: <p>I use Laravel 5 and have a form to upload a image. When saving the file I have in my controller methods to get the image and put it in a directory:</p>
  
  <pre><code>if ($request-&gt;hasFile('picture')) {
      $destinationPath = 'uploads';
      $filename = $image-&gt;getClientOriginalName();
      $extension = $image-&gt;getClientOriginalExtension(); // add
      $picture = sha1($filename . time()) . '.' . $extension; //add
      $offer-&gt;image = $picture;
      $image-&gt;move($destinationPath, $picture);
  }
  $offer-&gt;save();
  </code></pre>
  
  <p>Before I save the file I would like to resize the file with a max. width of 800px. Is there a image resize or compression function in Laravel available?
  What would be the best idea to do this?</p>