title: Handle Laravel 4 upload big file exception
body: <p>My target is to manage the max upload file exception, and show a client side friendly message, but I don´t know where is the best place to controll this. This is my controller method:</p>
  
  <pre><code>public function upload_file()
      {
          if (!Input::hasFile('file'))
              return;
  
          $utils = App::make('utils');
          $file = Input::file('file');
  
          $name = Input::get('name');
          $size = $file-&gt;getSize();
  
          if ($size &gt; FileModel::$max_file_size)
              return json_encode(array('success'=&gt;false, 'message'=&gt;sprintf('The file size should be lower than %smb.',FileModel::$max_file_size/1000000)));
  
          $original_file_name = $file-&gt;getClientOriginalName();
  
          $destination_directory = "";
  
          $final_file_name = $utils-&gt;copy_file_to_location($file);
  
          return json_encode(array('success'=&gt;true, 'file'=&gt;$original_file_name));
      }
  </code></pre>
  
  <p>And this is the utils copy_file_to_location method:</p>
  
  <pre><code>public function copy_file_to_location($file, $destination_directory = "")
      {
          if (!isset($file))
              return;
          $file_name = time()."_".$file-&gt;getClientOriginalName();
  
          $file-&gt;move(app_path().'/storage/files/'.$destination_directory, $file_name);
          return $file_name;
      }
  </code></pre>
  
  <p>I don't knwo where to handle the exception that is raised when uploading files that have a grater size than the server max upload file size variable. Where and how should I handle this to show a user friendly message and do not lock the user interface. By the way I'm using ExtJs 4 in the client side. Thanks.</p>
  
  <hr>
  
  <p>EDIT</p>
  
  <hr>
  
  <p>I found a related <a href="https://stackoverflow.com/questions/2133652/how-to-gracefully-handle-files-that-exceed-phps-post-max-size">question</a> that helps a lot (it is the same problem), but I need to know where, inside Laravel, should I check this.</p>