$file->hasPrev()
Checks if there's a previous sibling
-
return (boolean)
Example
$file = $page->file('myfile.pdf');
if($file->hasPrev()) {
echo 'Previous file: ' . $file->prev()->filename();
}
Checks if there's a previous sibling
$file = $page->file('myfile.pdf');
if($file->hasPrev()) {
echo 'Previous file: ' . $file->prev()->filename();
}