We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have Post model and User model
i have some post where user_id is null
public function user() { return $this->belongsTo('App\User'); }
Post::orderByJoin('user.name');
this only return records where user_id is not null.
how can i solve this. i also want that post where user_id is null
The text was updated successfully, but these errors were encountered:
Post::setLeftJoin(true)->orderByJoin('user.name');
Sorry, something went wrong.
thanks
No branches or pull requests
I have Post model and User model
i have some post where user_id is null
public function user()
{
return $this->belongsTo('App\User');
}
Post::orderByJoin('user.name');
this only return records where user_id is not null.
how can i solve this. i also want that post where user_id is null
The text was updated successfully, but these errors were encountered: