title: Why does laravel image upload show incorrect url in view?
body: <p>I have a form that uploads an image file to a post, very simply and it uses image intervention </p>
  
  <p><code>"intervention/image": "dev-master"</code></p>
  
  <p>so I can resize it etc but at the moment its a simple post action like so:</p>
  
  <pre><code>&lt;?php namespace Boroughcc\Http\Controllers;
  
  use Input;
  use Redirect;
  use Storage;
  use SirTrevorJs;
  use STConverter;
  use Validator;
  use Image;
  use Boroughcc\Post;
  use Boroughcc\Http\Requests;
  use Boroughcc\Http\Controllers\Controller;
  
  use Illuminate\Http\Request;
  
  class PostsController extends Controller {
  
  public function store()
      {
          // image upload function
  
          // $img = Image::make(Input::file('featured_image'));
          // dd($img);
  
          $input = Input::all();
          $validation = Validator::make($input, Post::$rules);
          $entry = array(
              'title' =&gt; Input::get('title'),
              'featured_image' =&gt; Input::file('featured_image')        
          );
          if ($validation-&gt;passes())
          {
              $img = Image::make(Input::file('featured_image'));
  
              $pathinfo = pathinfo($img);
              $type = $pathinfo['basename'];
              $filename = date('Y-m-d-H:i:s').$type;
              $path = 'img/posts/' . $filename;
              $img-&gt;save($path);
              $post = Post::create(
                  $entry
              );
              return Redirect::route('posts.index')-&gt;with('message', 'Post created');
          } else {
                  return Redirect::route('posts.create')
                  -&gt;withInput()
                  -&gt;withErrors($validation)
                  -&gt;with('message', 'There were validation errors.');
          }
  
          //Post::create( $input );
  
          // return Redirect::route('posts.index')-&gt;with('message', 'Post created');
  
  
      }
  </code></pre>
  
  <p>The post checks for validations and if all are correct it sends the post to save it and should hopefully generate the file. When it saves it the file goes into my <code>/public/img/posts/</code> folder fine. here is the post model below;</p>
  
  <p>Post.php</p>
  
  <pre><code>&lt;?php namespace Boroughcc;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Post extends Model {
  
      //
      protected $guarded = [];
  
      public static $rules = array(
          'title' =&gt; 'required',
          'featured_image' =&gt; 'required|image|mimes:jpeg,jpg,png,bmp,gif,svg'
      );
  
  }
  </code></pre>
  
  <p>So you can see what I am trying to output here is what I am using in the post.index page to output the image url here:</p>
  
  <pre><code>{!! Form::model(new Boroughcc\Post, ['route' =&gt; ['posts.store'], 'files' =&gt; true]) !!}
  &lt;div class="form-group"&gt;
      {!! Form::label('title', 'Title:') !!}
      {!! Form::text('title') !!}
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      &lt;strong&gt;Only edit this if necessary, this is auto populated&lt;/strong&gt;&lt;br&gt;
      {!! Form::label('slug', 'Slug:') !!}
      {!! Form::text('slug') !!}
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      {!! Form::label('featured_image', 'Featured Image:') !!}
      {!! Form::file('featured_image') !!}
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      {!! Form::label('body', 'Post body:') !!}
      {!! Form::textarea('body', null, array('id'=&gt;'','class'=&gt;'sir-trevor')) !!}
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      {!! Form::submit($submit_text, ['class'=&gt;'btn primary']) !!}
  &lt;/div&gt;
  {!! Form::close() !!}
  </code></pre>
  
  <p>When I go to get the file url to output I get this instead:</p>
  
  <p><code>"featured_image" =&gt; "/private/var/folders/mf/srx7jt8s2rdg0mn5hr98cvz80000gn/T/phpMEtuuA"</code></p>
  
  <p>This is what I get, is there something wrong with this and why is it rendering this only?</p>