UploadedFile
class UploadedFile extends UploadedFile (View source)
Traits
FileHelpers |
Macroable |
Properties
protected string | $hashName | The cache copy of the file's hash name. | from FileHelpers |
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. | from FileHelpers |
static void | macro(string $name, object|callable $macro) Register a custom macro. | from Macroable |
static void | mixin(object $mixin) Mix another object into the class. | 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 |
static FileFactory | fake() Begin creating a new file fake. | |
string|false | store(string $path, array|string $options = []) Store the uploaded file on a filesystem disk. | |
string|false | storePublicly(string $path, array|string $options = []) Store the uploaded file on a filesystem disk with public visibility. | |
string|false | storePubliclyAs(string $path, string $name, array|string $options = []) Store the uploaded file on a filesystem disk with public visibility. | |
string|false | storeAs(string $path, string $name, array|string $options = []) Store the uploaded file on a filesystem disk. | |
bool|string | get() Get the contents of the uploaded file. | |
static UploadedFile | createFromBase(UploadedFile $file, bool $test = false) Create a new file instance from a base instance. | |
array | parseOptions(array|string $options) Parse and format the given options. |
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.
static void macro(string $name, object|callable $macro)
Register a custom macro.
static void mixin(object $mixin)
Mix another object into the class.
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.
static FileFactory fake()
Begin creating a new file fake.
string|false store(string $path, array|string $options = [])
Store the uploaded file on a filesystem disk.
string|false storePublicly(string $path, array|string $options = [])
Store the uploaded file on a filesystem disk with public visibility.
string|false storePubliclyAs(string $path, string $name, array|string $options = [])
Store the uploaded file on a filesystem disk with public visibility.
string|false storeAs(string $path, string $name, array|string $options = [])
Store the uploaded file on a filesystem disk.
bool|string get()
Get the contents of the uploaded file.
static UploadedFile createFromBase(UploadedFile $file, bool $test = false)
Create a new file instance from a base instance.
protected array parseOptions(array|string $options)
Parse and format the given options.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Http/UploadedFile.html