->query(Plan::where('is_private', 0)
->orWhereIn('id', function($query){
$query->select('plan_id')
->from(with(new UserPlan)->getTable())
->where('user_id', auth()->user()->id);
})
->orderBy('price', 'ASC')
)
->query(Plan::where('is_private', 0)
->orWhereIn('id', function($query){
$query->select('plan_id')
->from(with(new UserPlan)->getTable())
->where('user_id', auth()->user()->id);
})
->orderBy('price', 'ASC')
)