class Illuminate / Http / Testing / FileFactory
You are viewing an older version of the documentation. For the latest, please visit master documentation.

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