moved file::upload to input::upload.

This commit is contained in:
Taylor Otwell 2011-08-22 22:38:20 -05:00
parent 15043348c1
commit 3d83b65bb7
2 changed files with 12 additions and 11 deletions

View File

@ -154,15 +154,4 @@ public static function download($path, $name = null)
return $response;
}
/**
* Move an uploaded file to storage.
*
* @param string $key
* @param string $path
* @return bool
*/
public static function upload($key, $path)
{
return array_key_exists($key, $_FILES) ? move_uploaded_file($_FILES[$key]['tmp_name'], $path) : false;
}
}

View File

@ -86,6 +86,18 @@ public static function file($key = null, $default = null)
return Arr::get($_FILES, $key, $default);
}
/**
* Move an uploaded file to permanent storage.
*
* @param string $key
* @param string $path
* @return bool
*/
public static function upload($key, $path)
{
return array_key_exists($key, $_FILES) ? move_uploaded_file($_FILES[$key]['tmp_name'], $path) : false;
}
/**
* Hydrate the input data for the request.
*