title: Cannot update file upload form, laravel form binding
body: <p>Hello I have to edit and update a form with file upload. When i edit the other fields and also i upload a photo it works. but if i edit other fields without uploading a photo it shows error " Call to a member function getClientOriginalName() on a non-object "</p>
  
  <p>my view </p>
  
  <pre><code>{{ Form::model($layer, array('method'=&gt;'PATCH', 'route'=&gt;array('edit-layer-patch', $layer-&gt;id), 'files'=&gt; true)) }}
  
  
  &lt;div class="form-group"&gt;
      &lt;input type="file" name="image" value="{{ $layer-&gt;img_path }}" class="form-control" onchange="readURL(this);" id="image" accept="image/*" /&gt;
      {{ HTML::image('uploads/'. $layer-&gt;img_path, 'your image', array('id' =&gt; 'blah', 'width'=&gt;150, 'height' =&gt; 100)) }}
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
      &lt;label for="layer_name"&gt;Layer Name&lt;/label&gt;
      &lt;input type="text" class="form-control"  name="layer_name" value="{{ $layer-&gt;layer_name }}" /&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;    
  &lt;label for="select_user"&gt;Select User&lt;/label&gt;
  &lt;select name="select_user" class="form-control"&gt;
      &lt;option value="{{ $layer-&gt;user-&gt;id }}"&gt;{{ $layer-&gt;user-&gt;firstname }}&lt;/option&gt;
      @foreach($users as $user)
      &lt;option value="{{ $user-&gt;id }}"&gt;{{ $user-&gt;firstname }}&lt;/option&gt;
      @endforeach
  &lt;/select&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;    
  &lt;label for="select_style"&gt;Select Style&lt;/label&gt;
  &lt;select name="select_style" class="form-control"&gt;
      &lt;option value="{{ $layer-&gt;style-&gt;id }}"&gt;{{ $layer-&gt;style-&gt;style_name }}&lt;/option&gt;
      @foreach($styles as $style)
      &lt;option value="{{ $style-&gt;id }}"&gt;{{ $style-&gt;style_name }}&lt;/option&gt;
      @endforeach
  &lt;/select&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;    
  &lt;label for="select_category"&gt;Select Category&lt;/label&gt;
  &lt;select name="select_category" class="form-control"&gt;
      @if(!empty($layer-&gt;category-&gt;category_name))
      &lt;option value="{{ $layer-&gt;category-&gt;id }}"&gt;{{ $layer-&gt;category-&gt;category_name }}&lt;/option&gt;
      @foreach($categories as $category)
      &lt;option value="{{ $category-&gt;id }}"&gt;{{ $category-&gt;category_name }}&lt;/option&gt;
      @endforeach
      @else
      &lt;option value=""&gt;Deleted&lt;/option&gt;
      @foreach($categories as $category)
      &lt;option value="{{ $category-&gt;id }}"&gt;{{ $category-&gt;category_name }}&lt;/option&gt;
      @endforeach
      @endif
  
  &lt;/select&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
      &lt;label for="published"&gt;Published&lt;/label&gt;
      &lt;input type="number" class="form-control" min="0" max="1"  name="published" value="{{ $layer-&gt;published }}" /&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
      &lt;label for="default"&gt;Default&lt;/label&gt;
      &lt;input type="number" class="form-control" min="0" max="1"  name="default" value="{{ $layer-&gt;default }}" /&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
      &lt;button class="btn btn-primary" type="submit"&gt;Update&lt;/button&gt;
      &lt;a class="btn btn-danger" href="{{ route('layers') }}"&gt;Cancel&lt;/a&gt;
  &lt;/div&gt;
  
  {{ Form::close() }}
  </code></pre>
  
  <p>my controller</p>
  
  <pre><code>public function edit($id){
  
      $image = Input::file('image');
  
      $filename = $image-&gt;getClientOriginalName();
  
      $destinationPath = 'uploads/';
  
      $layer = Layer::find($id);
  
      $validator = Validator::make(Input::all(), Layer::$rules);
  
      if ($validator-&gt;fails()) {
  
          return Redirect::route('edit-layer')-&gt;withErrors($validator)-&gt;with('message', 'Ups something happened');
      }else{  
       //Image::make($image-&gt;getRealPath())-&gt;save($path);
          Input::file('image')-&gt;move($destinationPath, $filename);
  
  
  
          if(Input::has('image')){
              $layer-&gt;user_id       = Input::get('select_user');
              $layer-&gt;style_id      = Input::get('select_style');
              $layer-&gt;category_id   = Input::get('select_category');
              $layer-&gt;layer_name    = Input::get('layer_name');
              $layer-&gt;published     = Input::get('published');
              $layer-&gt;default       = Input::get('default');
              $layer-&gt;save(); 
          }else{
              $layer-&gt;user_id       = Input::get('select_user');
              $layer-&gt;style_id      = Input::get('select_style');
              $layer-&gt;category_id   = Input::get('select_category');
              $layer-&gt;layer_name    = Input::get('layer_name');
              $layer-&gt;published     = Input::get('published');
              $layer-&gt;default       = Input::get('default');
              $layer-&gt;img_path = $filename;
              $layer-&gt;save(); 
          }
  
          return Redirect::route('layers')-&gt;with('message','Layer Updated');
      }
  }
  </code></pre>
  
  <p>Please help me, thank you</p>