Example #1
0
 public static function inGame($userId, $poolId)
 {
     return PoolPlayer::where('user_id', '=', $userId)->where('pool_id', '=', $poolId)->first();
 }
 public function removePlayerClaim(Request $request)
 {
     $data = $request->input('poolPlayer');
     $player = PoolPlayer::find($data['id']);
     $squares = $player->unPaidSquares($data['poolId']);
     if ($squares) {
         PoolSquare::unClaimSquares($squares, $data['claimDown']);
     }
     return response()->json('success');
 }