getTypes()->map(function(string $repo) use ($member) { $repo = app($repo); return [ 'href' => route('member.singlepdf', ['member' => $member, 'type' => get_class($repo)]), 'label' => $repo->linkLabel(), 'disabled' => !$repo->createable($member), ]; }); } }