where('dist_id', $distId)->where('appearance_id', $appearanceId)->count(); if ($count > 0) { return true; } else { return false; } } }