add pdf-cover
This commit is contained in:
parent
bd95cf4613
commit
7cc2b2a9e8
19 changed files with 119 additions and 11 deletions
|
|
@ -17,6 +17,7 @@ function getFileData($file) {
|
|||
|
||||
if($file->extension() == "pdf") {
|
||||
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
|
||||
$data['cover'] = $file->cover()->exists() && $file->cover()->isNotEmpty() ? $file->cover()->toFile()->resize(576)->url() : false;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue