*/ public function __invoke(): Collection { return LibraryItem::query() ->where('type', 'bindle') ->with([ 'media', ]) ->orderByDesc('id') ->get() ->map(fn ($item) => [ 'id' => $item->id, 'name' => $item->name, 'link' => strtok($item->value, '?'), 'image' => $item->getFirstMediaUrl('main'), ]); } }