I would like to get all the models that have no relationship.
Similar to a selection of models that have one:
return $this->model->has('quote')->orderBy('created_at', 'desc')->get();
I wish I had the opposite. I can't find the documentation to do this though.
Basically this query:
SELECT * FROM custom_design_requests RIGHT JOIN quotes ON quotes.`custom_design_request_id` = `custom_design_requests`.id
But I would like to avoid using Query Builder ( DB::table('custom_design_requests')->rightJoin('quotes', 'quotes.custom_design_request_id', '=', 'custom_design_requests.id')->get(); ), so I have a collection of model instances.
thanks
source share