How do I get results, where there are no results on the joined table, but only for that user?
For example:
$availableQuests = Upload::where('uploads.approved', 1)
->where('uploads.published', 1)
->where('uploads.available', 1)
->where('uploads.type', 'guide')
->join('completed_guides', 'uploads.id', '=', 'completed_guides.upload_id')
->whereNull('completed_guides.id')
->orderBy('published_at', 'desc')
->take(10)
->get();
The problem with this, this accounts for all users, I need to include completed_guides.user_id
somehow, to get all the uploads where the id doesnt match in completed_guides
If that makes sense?