class FileFactory (View source)
File | create(string $name, string|int $kilobytes = 0, string|null $mimeType = null) Create a new fake file. | |
File | createWithContent(string $name, string $content) Create a new fake file with content. | |
File | image(string $name, int $width = 10, int $height = 10) Create a new fake image. | |
resource | generateImage(int $width, int $height, string $type) Generate a dummy image of the given width and height. |
Create a new fake file.
Create a new fake file with content.
Create a new fake image.
Generate a dummy image of the given width and height.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Http/Testing/FileFactory.html