$subscription_count = DB::table('subscriptions')->where('pid_user',$pid_user)->count();
//check if any subscription plan exists
if($subscription_count == 0)
{
//record does not exist
}else{
//record exists
}