I pulled this from elsewhere on the forum:
<?php
class listing_releasesPage extends Page {
public function url() {
return $this->site()->url() . '/' . $this->uid();
}
}
as a starting point and I’m getting the error:
Fatal error : Declaration of listing_releasesPage::url() must be compatible with Kirby\Cms\Page::url($options = NULL): string in ----/site/models/listing_releases.php on line 3
Could you please help me with what I’m doing wrong here? I know this example was K2, but I couldn’t find anything in the docs that talked about this in terms of Page Models. listing_releases is the the template for the child of /releases/ in the route above.
Thank you so much!