title: Laravel :Attempt to assign property of non-object
body: <p><strong>Error:</strong></p>
  
  <pre><code>Attempt to assign property of non-object; ErrorException in AdminController.php line 40:
  </code></pre>
  
  <p><strong>AdminController:</strong></p>
  
  <pre><code>    public function createSlider(AdminRequest $request)
  {
      $input = Request::all();
      Sliders::create($input);
  
      if (Request::hasFile('image')) {
          $imageName = Request::input('title'). '.' .
              $request-&gt;file('image')-&gt;getClientOriginalExtension();
  
          $request-&gt;file('image')-&gt;move(
              base_path() . '/public/assets/image/', $imageName
          );
  
          $input-&gt;image = $imageName; //------------&gt; line 40.......
  
      }
      $input-&gt;save();
  }
  </code></pre>
  
  <p><strong>Html:</strong></p>
  
  <pre><code>{!!Form::open(array('url' =&gt; 'admin/new_slider', 'files' =&gt; true)) !!}
  &lt;div class = "form-group"&gt;
      {!!Form::label('title', 'Title:', ['class' =&gt; 'control-label']) !!}
      {!!Form::text('title', null, ['class'=&gt; 'input-mini ina tch'])!!}
  
      {!!Form::label('title', 'Description:', ['class' =&gt; 'control-label']) !!}
      {!!Form::text('description', null, ['class'=&gt; 'input-mini '])!!}
  &lt;/div&gt;
  
  &lt;div class = "form-group"&gt;
      {!!Form::label('title', 'Link:', ['class' =&gt; 'control-label']) !!}
      {!!Form::text('link', null, ['class'=&gt; 'input-mini'])!!}
  
      {!!Form::label('title', 'Image:', ['class' =&gt; 'control-label']) !!}
      {!! Form::file('image', ['id' =&gt; 'imgInp', 'class' =&gt; 'prev-upload']) !!}
  &lt;/div&gt;
  &lt;div class = "form-group"&gt;
      {!!Form::submit('Submit', ['class'=&gt; 'btn btn-default'])!!}
  &lt;/div&gt;
  </code></pre>
  
  <p>{!! Form::close() !!}</p>
  
  <p>I've been struggling with this all morning. I want to be able to accept a file upload along with the form information. Renaming the file is not necessary just how i thought i could get this to work. Is there a better way to do this file upload and move?</p>