$file->prev()
Returns the previous sibling
-
return ($file)
Example
if($prev = $page->file('myfile.pdf')->prev()) {
echo 'Previous file: ' . $prev->filename();
}
Returns the previous sibling
if($prev = $page->file('myfile.pdf')->prev()) {
echo 'Previous file: ' . $prev->filename();
}