Support the ongoing development of Laravel.io →
Architecture Testing
Last updated 1 year ago.
0

Do you need to add something like this before your class declaration?

use Your\Path\To\PageRepository as PageRepository;
Last updated 1 year ago.
0

Hello Sitesense,

Yes, sorry I forgot to paste the first 3 lines of my code. These classes are already in use.

Thank you for your answer. Any other idea? Pedro

Last updated 1 year ago.
0

Hi Pedro,

The error is saying trying to get property of non-object, so is $this->pageInfo an object?

Try this at the top of your index function:

dd($this->pageInfo);

What is the output?

Perhaps change this line:

//$texts = $this->page->getPageTexts($this->pageInfo->id);

$texts = $this->page->getPageTexts($this->pageInfo['id']);

Just a guess because I don't know what $this->pageInfo is.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

plmarcelo plmarcelo Joined 1 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.