Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 377 Bytes
namespace Kirby\Site\Models;
use Kirby\Cms\Page;
class CookbookPage extends Page
public function recipes(string $category)
return $this->index()->filter(function ($recipe) use ($category) {
return $recipe->parent()->slug() === $category ||
in_array($category, $recipe->secondary()->split(','));
You can’t perform that action at this time.