prepareRender(); $relations = []; foreach ($this->bundle->metadata('relations')->all() as $category => $bundles) { foreach ($bundles as $path) { $relations[$category][] = new Bundle($path, $this->bundle->getDisk()); } $relations[$category] = collect($relations[$category])->sortByDesc(function (Bundle $bundle) { return $bundle->metadata()->get('date'); })->toArray(); } data_set($this->viewData, 'relations', $relations); return [$this->bundle->getPath() => $this->renderPage('term')]; } /** * Return a boolean value indicating if this creator in particular can * create bundles for specified section */ public static function handles(Bundle $bundle): bool { return $bundle->getSection() && $bundle->getSection()->getPath() === '/termes/'; } protected function handlePagination(int $currentPage = 1) { } protected function collectSubBundles() { return []; } }