laravel/laravel — Issue #358: [3.0] The File::upload function is missing
Author: danielboendergaard
Created: 2012-02-23 08:33:09+00:00
State: open

There's an upload function in the File class in the docs but not in the code.

I found it in the 2.1 source:
```php
/**
* Move an uploaded file to permanent storage.
*
*
*	// Upload the $_FILES['photo'] file to a permanent location
*	File::upload('photo', 'path/to/new/home.jpg');
*
*
* @param string $key
* @param string $path
* @return bool
*/
public static function upload($key, $path)
{
if ( ! isset($_FILES[$key])) return false;

return move_uploaded_file($_FILES[$key]['tmp_name'], $path);
}
```