Skip to content
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

@nekodex
Copy link
Collaborator

@nekodex nekodex commented May 16, 2018

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

fixes #3165

Copy link
Collaborator

@nanaya nanaya left a comment

Seems fine.

$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" 💃

@peppy peppy dismissed nanaya’s stale review 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
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nekodex nekodex deleted the nekodex:show-old-tournaments branch Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants