/**
* ImageRepo constructor.
*/
- public function __construct(ImageService $imageService, PermissionService $permissionService) {
+ public function __construct(ImageService $imageService, PermissionService $permissionService)
+ {
$this->imageService = $imageService;
$this->restrictionService = $permissionService;
}
if ($filterType === 'page') {
$query->where('uploaded_to', '=', $contextPage->id);
} elseif ($filterType === 'book') {
- $validPageIds = $contextPage->book->pages()->visible()->get(['id'])->pluck('id')->toArray();
+ $validPageIds = $contextPage->book->pages()->visible()->pluck('id')->toArray();
$query->whereIn('uploaded_to', $validPageIds);
}
};