title: Laravel4: upload a photo
body: <p>I'm stuck..
  I want to add to give the possibity to add a new photo through a form.
  I have the Photo resource properly set up.
  The table photo with: id, title, caption, path:string.</p>
  
  <p>This is the form that i made until now in the view photo.create:</p>
  
  <pre><code>{{ Form::open(array('route' =&gt; 'photos.store'),'image/save', array('files'=&gt; true)) }}
  
   {{ Form::label('title', 'Title: ') }}
   {{ Form::text('title') }}
  
   {{ Form::label('caption', 'Caption: ') }}
   {{ Form::textarea('caption') }} &lt;br&gt;
  
   {{ Form::submit('Add Photo', array('class' =&gt; 'btn btn-primary' )) }}
  
   {{ Form::close() }}
  </code></pre>
  
  <p>How can i add a button thanks to which select a new file?</p>
  
  <p>Thank you!!</p>
  
  <p>EDIT:</p>
  
  <p>This is the simple store method i made until now:</p>
  
  <pre><code>public function store()
  {
      $input = Input::all();
  
      $rules = array('title' =&gt; 'required', 'path' =&gt; 'required');
  
      $validation = Validator::make($input, $rules);
  
      if ($validation-&gt;passes()) 
      {
  
          $photo = new Photo();
          $photo-&gt;title = $input['title'];
          $photo-&gt;caption = $input['caption'];
          $photo-&gt;path = $input['path'];
  
          $photo-&gt;save();
  
          return Redirect::route('photos.index');
      }
  
      return Redirect::back()-&gt;withInput()-&gt;withErrors($validation)-&gt;with('message','There were validation message');
  
  }
  </code></pre>
  
  <p>How can i put correctly there that implementation to retrieve the file and store in the folder located in public/img ?
  And then how can i save that path and put into $photo->path ?</p>
  
  <p>Thank you very much!!</p>