Commit 11f08fb7 by Taylor Otwell

Merge pull request #590 from Vespakoen/develop

Adding has_file method to the Input class
parents f53c8285 33c60274
......@@ -198,6 +198,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