Commit 33c60274 by Koen Schmeets

Adding has_file method

Signed-off-by: Koen Schmeets <k.schmeets@gmail.com>
parent 26730cd5
......@@ -179,6 +179,18 @@ class Input {
}
/**
* Determine if the uploaded data contains a file.
*
* @param string $key
* @return bool
*/
public static function has_file($key)
{
$file = static::file($key);
return ! empty($file['tmp_name']);
}
/**
* Move an uploaded file to permanent storage.
*
* This method is simply a convenient wrapper around move_uploaded_file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment