title: Small file get uploaded but not large file in Laravel
body: <p>I have this action in controler</p>
  
  <pre><code>    public function upload() {
    // getting all of the post data
    $file = array('image' =&gt; Input::file('image'));
    //return $file;
    // setting up rules
    $rules = array('image' =&gt; 'required'); //mimes:jpeg,bmp,png and for max size max:10000
    // doing the validation, passing post data, rules and the messages
    $validator = Validator::make($file, $rules);
    if ($validator-&gt;fails()) {
      // send back to the page with the input data and errors
     // return Redirect::to('upload')-&gt;withInput()-&gt;withErrors($validator);
     return "error validation";
    }
    else {
      // checking file is valid.
      if (Input::file('image')-&gt;isValid()) {
        $destinationPath = 'myuploads'; // upload path
        $extension = Input::file('image')-&gt;getClientOriginalExtension(); // getting image extension
        $fileName = Input::file('image')-&gt;getClientOriginalName();
       // $fileName = rand(11111,99999).'.'.$extension; // renameing image
        Input::file('image')-&gt;move($destinationPath, $fileName); // uploading file to given path
  
        return "upload success";
      }
      else {
        // sending back with error message.
        Session::flash('error', 'uploaded file is not valid');
        return "error";
      }
    }
  }
  </code></pre>
  
  <p>It works for small file size like 2MB but won't work for 4MB file size.
  For 4MB or more it gets error in validation.In the code above there's this code</p>
  
  <pre><code> if ($validator-&gt;fails()) {
  
         return "error validation";
        }
  </code></pre>
  
  <p>It gives this custom error <code>error validation</code>. I have already worked on configuring php.ini for max upload limit and post limit.</p>