$file->hasPrev()
Checks if there's a previous item in the collection
$file->hasPrev(): bool
Return type
bool
Example
$file = $page->file('myfile.pdf');
if($file && $file->hasPrev()) {
echo 'Previous file: ' . $file->prev()->filename();
}
Checks if there's a previous item in the collection
$file->hasPrev(): bool
bool
$file = $page->file('myfile.pdf');
if($file && $file->hasPrev()) {
echo 'Previous file: ' . $file->prev()->filename();
}