$file->read($format = null)

Reads the content of the file and returns it

  • $format (string)
    File format to parse as
  • return (string)

Example

// returns the content of the file
echo $page->file('readme.md')->read();

// parses the content as JSON
dump($page->file('data.json')->read('json'));