Published 2 months ago
How can I use both with() and leftjoin() in Laravel eloquent? I would like to use in below code.
$applicants = Applicant::with('applicant_skill')->paginate();
Just chain it?
How can I chain it?
@afoysal , @bashy ment this.
$applicants = Applicant::leftJoin()->with('applicant_skill')->paginate();
paginate() has been chained. Depends what you want to do and if it's the same table or not.
Please sign in or create an account to participate in this conversation.