web.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | This file is where you may define all of the routes that are handled
  8. | by your application. Just tell Laravel the URIs it should respond
  9. | to using a Closure or controller method. Build something great!
  10. |
  11. */
  12. Route::get('/', function () {
  13. return \Illuminate\Support\Facades\DB::table('votes')->count();
  14. });
  15. Route::any('/wechat', 'WechatController@serve');
  16. /*Route::group(['middleware' => ['web']], function (){
  17. Route::get('/users', 'UsersController@users');
  18. Route::get('/users/{openId}', 'UsersController@user');
  19. Route::get('/remark', 'UsersController@remark');
  20. Route::get('/image', 'MaterialController@image');
  21. Route::get('/menu', 'MenuController@menu');
  22. });*/
  23. Route::get('/vote/index', 'VoteController@index');
  24. Route::get('/vote/group/{group_id}', 'VoteController@group')->name('vote.group');
  25. Route::get('/vote/rank/{group_id}', 'VoteController@rank');
  26. Route::get('/dec','DecController@index');
  27. Route::get('/vote/players','DecController@group')->name('dec.group');
  28. Route::get('/vote/process/{id}','DecController@process');
  29. Route::get('/dec/rank','DecController@rank');
  30. Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
  31. Route::get('/vote/process/{player_id}', 'VoteController@process');
  32. });