title: Call to a member function on a non-object getting errors
body: <p>I tried so many time but this code is not working. I don't know why. It is a image upload form. This code worked for another form but here it's getting an error: <code>Call to a member function isValid() on a non-object</code></p>
  
  <pre><code>$file = array('dest_img' =&gt; Input::file('dest_img'));
  // checking file is valid.
      if (Input::file('dest_img')-&gt;isValid()) {
          $destinationPath = 'uploads'; // upload path
          $extension = Input::file('dest_img')-&gt;getClientOriginalExtension(); // getting image extension
          $fileName = $s.'.'.$extension; 
          $imgPath= $destinationPath.'/'.$fileName;
          //return $imgPath;
          // renameing image
          Input::file('dest_img')-&gt;move($destinationPath, $fileName); // uploading file to given path
          // sending back with message
          //Session::flash('success', 'Upload successfully'); 
          //return Redirect::to('tblaze_admin/bannerAdd');
  
           $data=array(
                      'dest_title'  =&gt;$input['dest_title'],
                      'dest_desc'  =&gt;$input['dest_desc'],
                      'dest_img' =&gt;$imgPath,
              );
              //$result=Cms::where('cms_id',$cms_id)-&gt;update($data);
  
          $result=Destination::where('dest_id',$dest_id)-&gt;update($data);
          if($result &gt;0)
          {
              \Session::flash('flash_message','Destination Updated Successfull!!');
          }
           else
           {
            \Session::flash('flash_error_message','Destination Updation Failed!!');
           }  
  }
  </code></pre>
  
  <p>I'm stuck at this code; please give a solution</p>