Commit 5fa78819 authored by Taylor Otwell's avatar Taylor Otwell

Merge branch 'develop' of github.com:laravel/laravel into develop

parents 295c3b80 11f08fb7
...@@ -64,7 +64,7 @@ class Bundle { ...@@ -64,7 +64,7 @@ class Bundle {
static::$bundles[$bundle] = array_merge($defaults, $config); static::$bundles[$bundle] = array_merge($defaults, $config);
// It is possible for the develoepr to specify auto-loader mappings // It is possible for the developer to specify auto-loader mappings
// directly on the bundle registration. This provides a convenient // directly on the bundle registration. This provides a convenient
// way to register mappings withuot a bootstrap. // way to register mappings withuot a bootstrap.
if (isset($config['autoloads'])) if (isset($config['autoloads']))
......
...@@ -210,7 +210,7 @@ if (defined('STDIN')) ...@@ -210,7 +210,7 @@ if (defined('STDIN'))
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Finally we will register all of the bundles that have been defined for | Finally we will register all of the bundles that have been defined for
| the application. None of them will be started, yet but will be setup | the application. None of them will be started yet, but will be setup
| so that they may be started by the developer at any time. | so that they may be started by the developer at any time.
| |
*/ */
......
...@@ -61,11 +61,11 @@ class File { ...@@ -61,11 +61,11 @@ class File {
* Delete a file. * Delete a file.
* *
* @param string $path * @param string $path
* @return void * @return bool
*/ */
public static function delete($path) public static function delete($path)
{ {
if (static::exists($path)) @unlink($path); if (static::exists($path)) return @unlink($path);
} }
/** /**
......
...@@ -197,6 +197,18 @@ class Input { ...@@ -197,6 +197,18 @@ class Input {
return array_get($_FILES, $key, $default); 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. * 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