where('from_bid',$bid)->select('id','to_bid')->first(); }catch (\Exception $e){ } return false; } public static function create($uid,$from_bid,$type,$to_bid){ if(empty($uid) || empty($bid) || empty($type)){ return false; } if(!self::getByUidAndBid($uid,$from_bid)){ try{ YqUserBidRelation::create([ 'uid'=>$uid, 'from_bid'=>$from_bid, 'type'=>$type, 'to_bid'=>$to_bid ]); }catch (\Exception $e){ } } return true; } }