New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show past tournaments on the tournament listing #3209

Merged
merged 3 commits into from May 18, 2018

Conversation

3 participants
@nekodex
Collaborator

nekodex commented May 16, 2018

Will probably need to add pagination later, but should be ok for the time being.

fixes #3165

$current = $tournaments->where('end_date', '>', Carbon::now());
$previous = $tournaments->where('end_date', '<=', Carbon::now());
return [

This comment has been minimized.

@nanaya

nanaya May 17, 2018

Collaborator

Can be either compact() or just do the where right here instead of assigning it first.

->where('signup_open', '<', Carbon::now())
->where('signup_close', '>', Carbon::now())
->orderBy('play_mode', 'desc')
$tournaments = self::query()

This comment has been minimized.

@nanaya

nanaya May 17, 2018

Collaborator

static? ⚡️

->orderBy('tournament_id', 'desc')
->get();
$current = $tournaments->where('end_date', '>', Carbon::now());
$previous = $tournaments->where('end_date', '<=', Carbon::now());

This comment has been minimized.

@nanaya

nanaya May 17, 2018

Collaborator

Probably doesn't matter but this Carbon::now() is different than the one before.

And that said, the entire thing has similar "problem" 💃

nekodex and others added some commits May 18, 2018

fixed

@peppy

peppy approved these changes May 18, 2018

@peppy peppy merged commit 0e3679e into ppy:master May 18, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment