JeroenvanRensen
2 months ago

Getting all items from model string

Posted 2 months ago by JeroenvanRensen

Hi everyone,

I've got the following situation: I have a variable called $resource with a model property. For example:

dd($resource->model);

Gives the output:

App\Page

How can I get all the pages accosiated with that page?

Unfortunately this doesn't work:

$resource->model->all();

Can anyone help me?

Thank you! Jeroen

Please sign in or create an account to participate in this conversation.