routes.php
13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Lumen the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
/**
* Home.
*/
$router->get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
/**
* Log in & Log out.
*/
$router->get('/login', ['as' => 'showLogin', 'uses' => 'AuthController@showLogin']);
$router->post('/login', ['as' => 'login', 'uses' => 'AuthController@login']);
$router->post('/fblogin', ['as' => 'fblogin', 'uses' => 'AuthController@facebookLogin']);
$router->post('/logout', ['as' => 'logout', 'uses' => 'AuthController@logout']);
/**
* Registration.
*/
$router->get('/signup', ['as' => 'registration', 'uses' => 'RegistrationController@signupForm']);
$router->post('/signup', ['uses' => 'RegistrationController@register']);
$router->get('/signup/request-activation', ['uses' => 'RegistrationController@requestActivation']);
$router->post('/signup/resend-activation', ['uses' => 'RegistrationController@resendActivation']);
$router->get('/signup/activation-sent', ['uses' => 'RegistrationController@activationSent']);
$router->get('/signup/check-username', ['uses' => 'RegistrationController@checkUsername']);
$router->get('/signup/done', ['uses' => 'RegistrationController@done']);
$router->get('/signup/confirm', ['uses' => 'RegistrationController@confirm']);
/**
* Suggestions.
*/
$router->get('/suggest/team', ['uses' => 'SuggestionController@team']);
/**
* Search.
*/
$router->get('/search-disabled', ['as' => 'search', 'uses' => 'SearchController@index']);
$router->post('/search.json', ['uses' => 'SearchController@search']);
/**
* Posts.
*/
$router->get('/posts-pagelet', ['uses' => 'PostController@postsPagelet']);
$router->post('/views/{objectRef}', ['uses' => 'ViewCounterController@recordPageView']);
/**
* Password reset and account recovery.
*/
$router->get('/profile/request-password-reset', ['uses' => 'AuthController@passwordResetRequest']);
$router->post('/profile/request-password-reset', ['uses' => 'AuthController@requestPasswordReset']);
$router->get('/profile/reset-password', ['uses' => 'AuthController@showResetPassword']);
$router->post('/profile/reset-password', ['uses' => 'AuthController@resetPassword']);
$router->get('/profile/password-reset-done', ['uses' => 'AuthController@passwordResetDone']);
/**
* Profile settings.
*/
$router->get('/profile/settings', ['as' => 'profileSettings', 'uses' => 'ProfileController@settings']);
$router->post('/profile/settings', ['uses' => 'ProfileController@updateSettings']);
$router->post('/profile/settings/upload-avatar', ['uses' => 'ProfileController@uploadAvatar']);
$router->post('/profile/settings/fbconnect', ['uses' => 'ProfileController@fbConnect']);
$router->post('/profile/settings/fbdisconnect', ['uses' => 'ProfileController@fbDisconnect']);
$router->post('/profile/settings/set-timezone', ['uses' => 'ProfileController@setTimezone']);
$router->post('/profile/settings/no-spoilers', ['uses' => 'ProfileController@noSpoilers']);
/**
* Profile Wall.
*/
$router->get('/profile/{username}/wall', ['as' => 'profileWall', 'uses' => 'ProfileController@wall']);
$router->post('/profile/wall/comments', ['uses' => 'ProfileController@storeWallComment']);
$router->put('/profile/wall/comments/{commentId:\d+}', ['uses' => 'ProfileController@editWallComment']);
/**
* Profile Friends.
*/
$router->get('/profile/{username}/friends', ['as' => 'profileFriends', 'uses' => 'ProfileController@friends']);
$router->get('/profile/{username}/friends.json', ['uses' => 'ProfileController@friendsJson']);
$router->post('/profile/friends/unfriend', ['uses' => 'ProfileController@unfriend']);
$router->post('/profile/friends/request', ['uses' => 'ProfileController@friendRequest']);
$router->post('/profile/friends/accept-request', ['uses' => 'ProfileController@acceptFriendRequest']);
$router->post('/profile/friends/delete-request', ['uses' => 'ProfileController@deleteFriendRequest']);
/**
* Rewrite old profile URLs.
*/
$router->get('/profile', ['uses' => 'CatchOldUrlController@profile']);
$router->get('/profile/wall', ['uses' => 'CatchOldUrlController@profileWall']);
$router->get('/profile/friends', ['uses' => 'CatchOldUrlController@profileFriends']);
/**
* Profile.
*/
$router->get('/profile/replies', ['as' => 'profileReplies', 'uses' => 'ProfileController@replies']);
$router->get('/profile/{username}', ['as' => 'profile', 'uses' => 'ProfileController@profile']);
/**
* Bans.
*/
$router->post('/bans', ['uses' => 'BanController@store']);
$router->post('/bans/request-permaban', ['uses' => 'BanController@requestPermaban']);
$router->get('/bans/overview', ['as' => 'bansOverview', 'uses' => 'BanController@overview']);
$router->get('/bans.json', ['uses' => 'BanController@bans']);
$router->get('/bans/summaries.json', ['uses' => 'BanController@summaries']);
$router->get('/bans/active', ['uses' => 'BanController@active']);
$router->get('/bans/active-pagelet', ['uses' => 'BanController@activePagelet']);
/**
* Puppets.
*/
$router->get('/puppets', ['uses' => 'ModeratorController@puppets']);
$router->get('/puppets.json', ['uses' => 'ModeratorController@puppetsJson']);
/**
* Previews.
*/
$router->get('/previews', ['as' => 'previews', 'uses' => 'PreviewController@index']);
$router->get('/matches/{id:\d+}/{slug}/preview', ['as' => 'matchPreview', 'uses' => 'PreviewController@show']);
/**
* Matches.
*/
$router->get('/matches/{id:\d+}/{slug}/review', ['as' => 'matchReview', 'uses' => 'MatchController@review']);
$router->get('/matches.json', ['uses' => 'MatchController@matchesJson']);
$router->post('/matches/comment', ['uses' => 'MatchController@comment']);
$router->put('/matches/comment/{commentId:\d+}', ['uses' => 'CommentController@edit']);
/**
* Lemix.
*/
$router->get('/lemix', ['as' => 'lemix', 'uses' => 'LemixController@index']);
$router->get('/lemix/{slug}-{id:\d+}', ['as' => 'lemixPost', 'uses' => 'LemixController@post']);
$router->get('/lemix/posts-pagelet', ['uses' => 'LemixController@postsPagelet']);
/**
* Legendary.
*/
$router->get('/legendary', ['as' => 'legendary', 'uses' => 'LegendaryController@index']);
/**
* Hall Of Fame.
*/
$router->get('/hall-of-fame', ['as' => 'hallOfFame', 'uses' => 'HoFController@index']);
$router->get('/hall-of-fame/{decade:[0-9]{4}}-{to:[0-9]{4}}', ['uses' => 'HoFController@decade']);
$router->get('/hall-of-fame/{playerSlug}', ['uses' => 'HoFController@showPost']);
/**
* Transfer Center.
*/
$router->get('/transfer-center', ['as' => 'transferCenter', 'uses' => 'TransferCenterController@index']);
$router->get('/transfer-center/deadline-day-live', ['uses' => 'TransferCenterController@deadlineDay']);
/**
* Talk.
*/
$router->get('/talk', ['as' => 'talk', 'uses' => 'TalkController@index']);
/**
* News.
*/
$router->get('/news', ['as' => 'news', 'uses' => 'NewsController@index']);
$router->get('/news/posts-pagelet', ['uses' => 'NewsController@postsPagelet']);
/**
* Competitions.
*/
$router->get('/competitions/{id:\d+}/{slug}', ['as' => 'competition', 'uses' => 'CompetitionController@index']);
/**
* Votes.
*/
$router->post('/vote', ['as' => 'vote', 'uses' => 'VoteController@vote']);
$router->post('/vote-score', ['as' => 'voteScore', 'uses' => 'VoteController@voteScore']);
$router->post('/vote-poll', ['as' => 'voteScore', 'uses' => 'VoteController@votePoll']);
$router->get('/vote/votes.json', ['uses' => 'VoteController@votes']);
/**
* Comments.
*/
$router->get('/comments-pagelet', ['uses' => 'CommentController@commentsPagelet']);
$router->get('/comments/{commentId:\d+}/parent-pagelet', ['uses' => 'CommentController@parentCommentPagelet']);
$router->get('/comments/{commentId:\d+}', ['uses' => 'CommentController@getComment']);
$router->post('/comments', ['uses' => 'CommentController@comment']);
$router->put('/comments/{commentId:\d+}', ['uses' => 'CommentController@edit']);
$router->post('/comments/{commentId:\d+}/approval', ['uses' => 'CommentController@changeApproval']);
$router->post('/comments/{commentId:\d+}/vote', ['uses' => 'CommentController@vote']);
$router->post('/comments/upload-image', ['uses' => 'CommentController@uploadImage']);
$router->post('/comments/{commentId:\d+}/flag', ['uses' => 'FlagsController@flagComment']);
/**
* Flags.
*/
$router->get('/flags/review', ['as' => 'flagsReview', 'uses' => 'FlagsController@review']);
$router->post('/flags/clear', ['uses' => 'FlagsController@clear']);
/**
* Forums.
*/
$router->get('/forum', ['as' => 'forum', 'uses' => 'ForumController@index']);
$router->get('/forum/discussions/{slug}-{id:\d+}', ['as' => 'forumPost', 'uses' => 'ForumController@showPost']);
$router->post('/forum/comments', ['uses' => 'ForumController@comment']);
$router->put('/forum/comments/{commentId:\d+}', ['uses' => 'ForumController@editComment']);
$router->post('/forum/discussions', ['uses' => 'ForumController@store']);
$router->post('/forum/discussions/{postId:\d+}/status', ['uses' => 'ForumController@editStatus']);
$router->post('/forum/discussions/{postId:\d+}/settings', ['uses' => 'ForumController@editSettings']);
$router->get('/forum/{categorySlug}', ['as' => 'forumCategory', 'uses' => 'ForumController@index']);
$router->post('/forum/discussions/{id:\d+}/count-view', ['uses' => 'ForumController@recordPageView']);
/**
* Subscription.
*/
$router->post('/subscriptions/follow', ['uses' => 'SubscriptionController@follow']);
$router->post('/subscriptions/ignore', ['uses' => 'SubscriptionController@ignore']);
/**
* Other/static pages.
*/
$router->get('/dmca', ['as' => 'dmca', 'uses' => 'ContactController@dmca']);
$router->get('/advertise', ['as' => 'advertise', 'uses' => 'AdvertiseController@index']);
$router->get('/advertise/ad-tester', ['uses' => 'AdvertiseController@adTester']);
$router->get('/feedback', ['as' => 'feedback', 'uses' => 'ContactController@feedback']);
$router->post('/feedback/send-mail', ['uses' => 'ContactController@submitFeedback']);
/**
* Predictor.
*/
$router->get('/predictor/matches.json', 'PredictorController@matches');
$router->get('/predictor/player.json', 'PredictorController@player');
$router->get('/predictor/rounds.json', 'PredictorController@rounds');
$router->get('/predictor/leaderboard.json', 'PredictorController@leaderboard');
$router->post('/predictor/predict', ['uses' => 'PredictorController@predict']);
$router->get('/predictor[/{any:.*}]', ['uses' => 'PredictorController@index']);
/**
* Tips.
*/
$router->get('/tips', 'TipController@index');
$router->get('/tips/{id}.json', 'TipController@tipJson');
$router->post('/tips', 'TipController@store');
$router->put('/tips/{id}', 'TipController@update');
$router->delete('/tips/{id}', 'TipController@delete');
/**
* Embed.
*/
$router->get('/embed', 'EmbedController@index');
$router->get('/oembed', 'EmbedController@oembed');
/**
* Polls.
*/
$router->get('/polls/{pollId}', ['uses' => 'PollController@getPoll']);
$router->post('/polls', ['uses' => 'PollController@store']);
$router->put('/polls/{pollId}', ['uses' => 'PollController@edit']);
/**
* Articles.
*/
$router->get('/articles/create', ['uses' => 'ArticleController@create']);
$router->get('/articles/{id}/edit', ['as' => 'editArticle', 'uses' => 'ArticleController@edit']);
$router->get('/articles/{slug}-{id}', ['as' => 'showArticle', 'uses' => 'ArticleController@show']);
$router->post('/articles/comment', ['uses' => 'ArticleController@comment']);
$router->post('/articles', ['uses' => 'ArticleController@store']);
$router->post('/articles/{id}', ['uses' => 'ArticleController@update']);
/*
|--------------------------------------------------------------------------
| Rewrite old URLs to new ones
|--------------------------------------------------------------------------
*/
/**
* Matches.
*
* Example url: http://footyroom.com/real-madrid-0-4-barcelona-2015-11/
*/
$router->get('/{homeTeam}-{homeScore:\d+}-{awayScore:\d+}-{awayTeam}-{year:\d\d\d\d}-{month:\d\d}', ['uses' => 'CatchOldUrlController@match']);
/**
* Previews.
*
* Example url: http://footyroom.com/preview/barcelona-vs-villarreal-preview-3/
* Example url: http://footyroom.com/barcelona-vs-villarreal-preview-3-2012-02/
*/
$router->get('/preview/{slug}', ['uses' => 'CatchOldUrlController@preview']);
$router->get('/{slug:.+-vs-.+}-{year:\d\d\d\d}-{month:\d\d}', ['uses' => 'CatchOldUrlController@preview']);
/**
* Le Mix.
*
* Example url: http://footyroom.com/top-10-goals-of-the-week-16112015-2015-11/
*/
$router->get('/{slug}-{year:\d\d\d\d}-{month:\d\d}', ['uses' => 'CatchOldUrlController@lemix']);
/**
* Forum Discussions.
*
* Example url: http://footyroom.com/forum/off-topic/what-antivirus-do-you-use-59572
*/
$router->get('/forum/{categorySlug}/{slug}-{id:\d+}', ['uses' => 'CatchOldUrlController@forumPost']);
/**
* Forum Discussions with page number.
*
* Example url: http://footyroom.com/forum/football-talk/barcelona-file-a-complaint-46174/3/
*/
$router->get('/forum/{categorySlug}/{slug}-{id:\d+}/{page:\d+}', ['uses' => 'CatchOldUrlController@forumPost']);
/**
* Competitions.
*
* Example url: http://footyroom.com/videos/england/premierleague/
*/
$router->get('/videos/{region}/{competitionSlug}', ['uses' => 'CatchOldUrlController@competitions']);
$router->get('/videos/{region}/{competitionSlug}/page/{page:\d+}', ['uses' => 'CatchOldUrlController@competitions']);
/**
* Sitemap.
*/
$router->get('/sitemap', 'SitemapController@index');
$router->get('/sitemap/forum/discussions', 'SitemapController@forumPosts');
$router->get('/sitemap/matches', 'SitemapController@matches');