+2
-2
app/Http/Controllers/FollowsController.php
+2
-2
app/Http/Controllers/FollowsController.php
···
137
137
138
138
private function indexForumTopic()
139
139
{
140
-
$topics = Topic::watchedByUser($this->user)->paginate(50);
140
+
$topics = Topic::watchedByUser($this->user)->paginate();
141
141
$topicReadStatus = TopicTrack::readStatus($this->user, $topics);
142
142
$topicWatchStatus = TopicWatch::watchStatus($this->user, $topics);
143
143
···
193
193
->visible()
194
194
->orderBy('last_notified', 'DESC')
195
195
->with('beatmapset')
196
-
->paginate(50);
196
+
->paginate();
197
197
$totalCount = $watches->total();
198
198
$unreadCount = $this->user->beatmapsetWatches()->visible()->unread()->count();
199
199
$openIssues = BeatmapDiscussion
+1
-1
app/Http/Controllers/Forum/ForumsController.php
+1
-1
app/Http/Controllers/Forum/ForumsController.php
+1
-1
app/Http/Controllers/Forum/TopicLogsController.php
+1
-1
app/Http/Controllers/Forum/TopicLogsController.php
+1
-1
app/Http/Controllers/Forum/TopicsController.php
+1
-1
app/Http/Controllers/Forum/TopicsController.php
···
625
625
], ['null_missing' => true]);
626
626
627
627
$params['skip_layout'] = $params['skip_layout'] ?? false;
628
-
$params['limit'] = clamp($params['limit'] ?? 20, 1, 50);
628
+
$params['limit'] = clamp($params['limit'] ?? Post::PER_PAGE, 1, 50);
629
629
630
630
if ($userCanModerate) {
631
631
$params['with_deleted'] ??= ($currentUser->userProfileCustomization ?? UserProfileCustomization::DEFAULTS)['forum_posts_show_deleted'];
+3
-2
app/Http/Controllers/Multiplayer/RoomsController.php
+3
-2
app/Http/Controllers/Multiplayer/RoomsController.php
···
7
7
8
8
use App\Exceptions\InvariantException;
9
9
use App\Http\Controllers\Controller as BaseController;
10
+
use App\Models\Model;
10
11
use App\Models\Multiplayer\Room;
11
12
use App\Transformers\Multiplayer\RoomTransformer;
12
13
···
114
115
115
116
public function leaderboard($roomId)
116
117
{
117
-
$limit = clamp(get_int(request('limit')) ?? 50, 1, 50);
118
+
$limit = clamp(get_int(request('limit')) ?? Model::PER_PAGE, 1, 50);
118
119
$room = Room::findOrFail($roomId);
119
120
120
121
// leaderboard currently requires auth so auth()->check() is not required.
···
182
183
}
183
184
$beatmaps = $playlistItemsQuery->with('beatmap.beatmapset.beatmaps')->get()->pluck('beatmap');
184
185
$beatmapsets = $beatmaps->pluck('beatmapset');
185
-
$highScores = $room->topScores()->paginate(50);
186
+
$highScores = $room->topScores()->paginate();
186
187
$spotlightRooms = Room::featured()->orderBy('id', 'DESC')->get();
187
188
188
189
return ext_view('multiplayer.rooms.show', [
+2
-1
app/Http/Controllers/RankingController.php
+2
-1
app/Http/Controllers/RankingController.php
···
8
8
use App\Models\Beatmap;
9
9
use App\Models\Country;
10
10
use App\Models\CountryStatistics;
11
+
use App\Models\Model;
11
12
use App\Models\Spotlight;
12
13
use App\Models\User;
13
14
use App\Models\UserStatistics;
···
28
29
private $friendsOnly;
29
30
30
31
const MAX_RESULTS = 10000;
31
-
const PAGE_SIZE = 50;
32
+
const PAGE_SIZE = Model::PER_PAGE;
32
33
const RANKING_TYPES = ['performance', 'charts', 'score', 'country'];
33
34
const SPOTLIGHT_TYPES = ['charts'];
34
35
// in display order
+1
-1
app/Http/Controllers/Store/OrdersController.php
+1
-1
app/Http/Controllers/Store/OrdersController.php
+2
app/Models/Model.php
+2
app/Models/Model.php
···
22
22
use HasFactory, Traits\FasterAttributes, Validatable;
23
23
24
24
const MAX_FIELD_LENGTHS = [];
25
+
const int PER_PAGE = 50;
25
26
26
27
protected $connection = 'mysql';
27
28
protected $guarded = [];
28
29
protected array $macros = [];
30
+
protected $perPage = self::PER_PAGE;
29
31
protected $primaryKeys;
30
32
31
33
public static function booted()