I need to make a query where both where are fulfilled, in this case that as long as user X and the status is PUBLISHED or DRAFT shows it, I currently have:
$properties = Accommodation::where("user_id", $id)
->where("status", 'PUBLISHED')
->orWhere("status", 'DRAFT')
->get();
The problem is that it shows all of them, it does not filter by users.
Something like:
$properties = Accommodation::where("user_id", $id)AND
->where("status", 'PUBLISHED')
AND->orWhere("status", 'DRAFT')
->get();