UploadedFile
class UploadedFile extends UploadedFile (View source)
Traits
FileHelpers |
Macroable |
Properties
static protected array | $macros | The registered string macros. | from Macroable |
Methods
string | path() Get the fully qualified path to the file. | from FileHelpers |
string | extension() Get the file's extension. | from FileHelpers |
string | clientExtension() Get the file's extension supplied by the client. | from FileHelpers |
string | hashName(string $path = null) Get a filename for the file that is the MD5 hash of the contents. | from FileHelpers |
static void | macro(string $name, callable $macro) Register a custom macro. | from Macroable |
static bool | hasMacro(string $name) Checks if macro is registered. | from Macroable |
static mixed | __callStatic(string $method, array $parameters) Dynamically handle calls to the class. | from Macroable |
mixed | __call(string $method, array $parameters) Dynamically handle calls to the class. | from Macroable |
string|false | store(string $path, string|null $disk = null) Store the uploaded file on a filesystem disk. | |
string|false | storePublicly(string $path, string|null $disk = null) Store the uploaded file on a filesystem disk with public visibility. | |
string|false | storePubliclyAs(string $path, string $name, string|null $disk = null) Store the uploaded file on a filesystem disk with public visibility. | |
string|false | storeAs(string $path, string $name, string|null $disk = null, string|null $visibility = null) Store the uploaded file on a filesystem disk. | |
static UploadedFile | createFromBase(UploadedFile $file, bool $test = false) Create a new file instance from a base instance. |
Details
string path()
Get the fully qualified path to the file.
string extension()
Get the file's extension.
string clientExtension()
Get the file's extension supplied by the client.
string hashName(string $path = null)
Get a filename for the file that is the MD5 hash of the contents.
static void macro(string $name, callable $macro)
Register a custom macro.
static bool hasMacro(string $name)
Checks if macro is registered.
static mixed __callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed __call(string $method, array $parameters)
Dynamically handle calls to the class.
string|false store(string $path, string|null $disk = null)
Store the uploaded file on a filesystem disk.
string|false storePublicly(string $path, string|null $disk = null)
Store the uploaded file on a filesystem disk with public visibility.
string|false storePubliclyAs(string $path, string $name, string|null $disk = null)
Store the uploaded file on a filesystem disk with public visibility.
string|false storeAs(string $path, string $name, string|null $disk = null, string|null $visibility = null)
Store the uploaded file on a filesystem disk.
static UploadedFile createFromBase(UploadedFile $file, bool $test = false)
Create a new file instance from a base instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Http/UploadedFile.html