class File extends UploadedFile (View source)
FileHelpers |
Macroable |
string | $name | The name of the file. | |
resource | $tempFile | The temporary file resource. | |
int | $sizeToReport | The "size" to report. |
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, 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 |
static FileFactory | fake() Begin creating a new file fake. | from UploadedFile |
string|false | store(string $path, array $options = array()) Store the uploaded file on a filesystem disk. | from UploadedFile |
string|false | storePublicly(string $path, array $options = array()) Store the uploaded file on a filesystem disk with public visibility. | from UploadedFile |
string|false | storePubliclyAs(string $path, string $name, array $options = array()) Store the uploaded file on a filesystem disk with public visibility. | from UploadedFile |
string|false | storeAs(string $path, string $name, array $options = array()) Store the uploaded file on a filesystem disk. | from UploadedFile |
static UploadedFile | createFromBase(UploadedFile $file, bool $test = false) Create a new file instance from a base instance. | from UploadedFile |
void | __construct(string $name, resource $tempFile) Create a new file instance. | |
static File | create(string $name, int $kilobytes) Create a new fake file. | |
static File | image(string $name, int $width = 10, int $height = 10) Create a new fake image. | |
$this | size(int $kilobytes) Set the "size" of the file in kilobytes. | |
int | getSize() Get the size of the file. | |
string | getMimeType() Get the MIME type for the file. |
Get the fully qualified path to the file.
Get the file's extension.
Get the file's extension supplied by the client.
Get a filename for the file.
Register a custom macro.
Checks if macro is registered.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Begin creating a new file fake.
Store the uploaded file on a filesystem disk.
Store the uploaded file on a filesystem disk with public visibility.
Store the uploaded file on a filesystem disk with public visibility.
Store the uploaded file on a filesystem disk.
Create a new file instance from a base instance.
Create a new file instance.
Create a new fake file.
Create a new fake image.
Set the "size" of the file in kilobytes.
Get the size of the file.
Get the MIME type for the file.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Http/Testing/File.html