Commit 11f08fb7 authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #590 from Vespakoen/develop

Adding has_file method to the Input class
parents f53c8285 33c60274
......@@ -197,6 +197,18 @@ class Input {
return array_get($_FILES, $key, $default);
}
/**
* 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.
*
......
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