Get the first record and select a given table column name in one line

Posted 1 month ago by zaster

Is there a way to do the below mentioned in one line?

$sub_job = $sub_jobs->first();
$comp = $sub_job->comp;

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

Reply to

Use Markdown with GitHub-flavored code blocks.