Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Waldemar's avatar

Take a 3 tables

i need take a 3 tables from DB with eloquent

$page = Page::find(1);
$page->block->subBlock->toArray();

how to take that?

0 likes
3 replies
Sergiu17's avatar

Do you mean

$page = Page::with('block.subBlock')->find(1)->toArray();

?

Please or to participate in this conversation.