FileFactory
class FileFactory (View source)
Methods
create(string $name, string|int $kilobytes = 0, string|null $mimeType = null)
Create a new fake file.
createWithContent(string $name, string $content)
Create a new fake file with content.
resource
generateImage(int $width, int $height, string $extension)
Generate a dummy image of the given width and height.
Details
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.
protected resource
generateImage(int $width, int $height, string $extension)
Generate a dummy image of the given width and height.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.