title: Laravel: How to save images to public folder?
body: <p>I am having trouble uploading a user image to my public folder. The file name generates correctly, and saves the name to my database, except the iamge itself refuses to get saved into my public folder. What am I doing wrong?</p>
  
  <pre><code>  public function update_avatar(Request $request) {
    if($request-&gt;hasFile('avatar')) {
  
      $avatar = $request-&gt;file('avatar');
      $filename = time() . "." . $avatar-&gt;getClientOriginalExtension();
  
      Image::make($avatar)-&gt;resize(300,300)-&gt;save(public_path('/uploads/'.$filename)); ==&gt; This is causing me errors
  
      user = Auth::user();
      $user-&gt;avatar = $filename;
      $user-&gt;save();
  
    }
  </code></pre>