moved file::upload to input::upload.
This commit is contained in:
@@ -154,15 +154,4 @@ class File {
|
|||||||
return $response;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -86,6 +86,18 @@ class Input {
|
|||||||
return Arr::get($_FILES, $key, $default);
|
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.
|
* Hydrate the input data for the request.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user