Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ->select(DB::Raw('IFNULL(upm2.meta_value,(CASE WHEN UserSubscription.subscription_plan = "MASHVISOR_PRO_AGENT" THEN 2
- WHEN UserSubscription.subscription_plan = "MASHVISOR_EXPERT_AGENT" THEN 3
- WHEN UserSubscription.subscription_plan = "MASHVISOR_TOP_AGENT" THEN 4
- ELSE upm2.meta_value
- END)) - COUNT(distinct AL1.id) AS remainingLeads'))
- ->having(DB::raw('`remainingLeads`'), $comp , $remainingLeads ? $remainingLeads : -9999 ))
Add Comment
Please, Sign In to add comment