class UploadedFile extends UploadedFile

Traits

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.

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, 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.

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.

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

in FileHelpers at line 21
string path()

Get the fully qualified path to the file.

Return Value

string

in FileHelpers at line 31
string extension()

Get the file's extension.

Return Value

string

in FileHelpers at line 41
string clientExtension()

Get the file's extension supplied by the client.

Return Value

string

in FileHelpers at line 52
string hashName(string $path = null)

Get a filename for the file.

Parameters

string $path

Return Value

string

in Macroable at line 24
static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name
callable $macro

Return Value

void

in Macroable at line 35
static bool hasMacro(string $name)

Checks if macro is registered.

Parameters

string $name

Return Value

bool

in Macroable at line 49
static mixed __callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in Macroable at line 71
mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

at line 20
static FileFactory fake()

Begin creating a new file fake.

Return Value

FileFactory

at line 32
string|false store(string $path, array|string $options = [])

Store the uploaded file on a filesystem disk.

Parameters

string $path
array|string $options

Return Value

string|false

at line 44
string|false storePublicly(string $path, array|string $options = [])

Store the uploaded file on a filesystem disk with public visibility.

Parameters

string $path
array|string $options

Return Value

string|false

at line 61
string|false storePubliclyAs(string $path, string $name, array|string $options = [])

Store the uploaded file on a filesystem disk with public visibility.

Parameters

string $path
string $name
array|string $options

Return Value

string|false

at line 78
string|false storeAs(string $path, string $name, array|string $options = [])

Store the uploaded file on a filesystem disk.

Parameters

string $path
string $name
array|string $options

Return Value

string|false

at line 96
static UploadedFile createFromBase(UploadedFile $file, bool $test = false)

Create a new file instance from a base instance.

Parameters

UploadedFile $file
bool $test

Return Value

UploadedFile

at line 114
protected array parseOptions(array|string $options)

Parse and format the given options.

Parameters

array|string $options

Return Value

array