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

Thunderson's avatar

Thunderson wrote a reply+100 XP

1mo ago

How to retrieve only some pivot values (not all)

did you found a way to fix it ??

Thunderson's avatar

Thunderson wrote a reply+100 XP

1mo ago

Eloquent eager loading

Yes, the issue is with how you wrote StepResource::collection($this->whenLoaded('steps')). You should use $this->whenLoaded('steps', fn() => StepResource::collection($this->steps)) instead.