Hey! I’m currently reading and trying out the “Content from a database” Article from the Guide.
I created some virtual pages and now i want to be able to write the content.
Now my question to this. How can i dump and see the data in a page model?
I want to see the content in the writeContent function but i don’t know why.
How can i dump the $data array from writeContent?
class CommentPage extends Kirby\Cms\Page
{
public function writeContent(array $data, string $languageCode = null): bool
{
unset($data['title']);
if ($comment = Db::first('comments', '*', ['slug' => $this->slug()])) {
return Db::update('comments', $data, ['slug' => $this->slug()]);
} else {
$data['slug'] = $this->slug();
return Db::insert('comments', $data);
}
}