Skip to content

Commit bfc0d80

Browse files
committed
feat: add functionality to find attachment by id
1 parent 11b012c commit bfc0d80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/AttachmentManager.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ protected function getFilesystem(): Filesystem
9595
return Storage::disk($this->disk);
9696
}
9797

98+
/**
99+
* Return single file or null for given ID.
100+
*/
101+
public function find(string|int $id): ?Attachment
102+
{
103+
return $this->attachmentClass::find($id);
104+
}
105+
98106
/**
99107
* Return files under a given path.
100108
*

0 commit comments

Comments
 (0)