Have you thought of using two Eloquent items in your queries - has('relationshipname') or doesntHave.
Have a look at https://laravel.com/docs/5.8/eloquent-relationships#querying-relationship-existence
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community