class Illuminate / Http / Testing / FileFactory
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

FileFactory

Methods

public

create ( $name , $kilobytes , $mimeType ) : File

Create a new fake file.

Parameters

  • $name string
  • $kilobytes string|int
  • $mimeType string|null
public

createWithContent ( $name , $content ) : File

Create a new fake file with content.

Parameters

  • $name string
  • $content string
public

image ( $name , $width , $height ) : File

Create a new fake image.

Parameters

  • $name string
  • $width int
  • $height int
protected

generateImage ( $width , $height , $extension ) : resource

Generate a dummy image of the given width and height.

Parameters

  • $width int
  • $height int
  • $extension string