Querying Relations

Posted 1 month ago by zaster
$job->load('sub_jobs.company');

foreach($job->sub_jobs as $sub_job)
{
    dd($sub_job->company);
}

Works

What i want is to do something like this

$companies = $job->sub_jobs->company;

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

Reply to

Use Markdown with GitHub-flavored code blocks.