title: laravel image upload error
body: <p>i'm using intervention package to upload images with laravel and all things are fine from creating to saving image but the problem in the image column in database it stores this name with path </p>
  
  <p>/private/var/folders/18/0w78rt691m99y_kv8xln4n0c0000gn/T/phpFkP3Gh</p>
  
  <p>this is my code:</p>
  
  <pre><code>if($request-&gt;hasFile('image')) {
    $image = $request-&gt;file('image');
    $filename = time() . '.' . $image-&gt;getClientOriginalExtension();
    $location = public_path('images/' . $filename);
    \Image::make($image)-&gt;save($location);
   }
  </code></pre>
  
  <p>and this is the image name stored in images file 1503847676.jpg</p>
  
  <p>please help me to find, where is the problem?</p>
  
  <p>this is my whole method </p>
  
  <pre><code>public function update(Request $request, $id)
      {
  
          // Validating fields requests
          $this-&gt;validate($request, [
  
              'title'     =&gt;  'required|min:6',
              'subtitle'  =&gt;  'required|min:6',
              'slug'      =&gt;  'required',
              'body'      =&gt;  'required',
              'image'     =&gt;  'required|mimes:jpeg,png,jpg,gif,svg'
          ]);
  
          if($request-&gt;hasFile('image')) {
             $image = $request-&gt;file('image');
             $filename = time() . '.' . $image-&gt;getClientOriginalExtension();
             $location = public_path('images/' . $filename);
             \Image::make($image)-&gt;save($location);
          }
  
          //find target post
          $post = Post::find($id);
  
          //create upadeted data from inputs fields
          $post-&gt;title = $request-&gt;title;
          $post-&gt;subtitle = $request-&gt;subtitle;
          $post-&gt;image = $filename;
          $post-&gt;slug = $request-&gt;slug;
          $post-&gt;image = $request-&gt;image;
          $post-&gt;status = $request-&gt;status;
          $post-&gt;body = $request-&gt;body;
  
          //save the new data to database
          $post-&gt;save();
          $post-&gt;tags()-&gt;sync($request-&gt;tags);
          $post-&gt;categories()-&gt;sync($request-&gt;categories);
  
          return redirect('/admin/post');
  
  
      }
  </code></pre>