$user_id = 1;
$api_account_id = 2;
$items = Item::with('images')->whereHas('user' => function($query) use($user_id, $api_account_id) {
$query->where('user_id', '=', $user_id);
$query->where('api_account_id', '=', $api_account_id);
})->get();
untested
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community