RouteServiceProvider.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\Facades\Route;
  4. use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
  5. class RouteServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * This namespace is applied to your controller routes.
  9. *
  10. * In addition, it is set as the URL generator's root namespace.
  11. *
  12. * @var string
  13. */
  14. protected $namespace = 'App\Http\Controllers';
  15. /**
  16. * Define your route model bindings, pattern filters, etc.
  17. *
  18. * @return void
  19. */
  20. public function boot()
  21. {
  22. //
  23. parent::boot();
  24. }
  25. /**
  26. * Define the routes for the application.
  27. *
  28. * @return void
  29. */
  30. public function map()
  31. {
  32. $this->mapApiRoutes();
  33. $this->mapWebRoutes();
  34. $this->mapGameRoutes();
  35. // $this->singlePlayRoutes();
  36. //
  37. }
  38. /**
  39. * Define the "web" routes for the application.
  40. *
  41. * These routes all receive session state, CSRF protection, etc.
  42. *
  43. * @return void
  44. */
  45. protected function mapWebRoutes()
  46. {
  47. Route::middleware('web')
  48. ->namespace($this->namespace)
  49. ->group(base_path('routes/web.php'));
  50. }
  51. protected function mapGameRoutes()
  52. {
  53. Route::prefix('game')
  54. // ->middleware('filter26')
  55. ->middleware('GameEncrypt')
  56. // ->middleware('cors')
  57. ->namespace($this->namespace)
  58. ->group(base_path('routes/game.php'));
  59. // Route::prefix('ruby')
  60. // ->middleware('filter26')
  61. // ->namespace($this->namespace)
  62. // ->group(base_path('routes/game.php'));
  63. //
  64. // Route::prefix('leg')
  65. // ->middleware('filter26')
  66. // ->middleware('EncryptInOut')
  67. // ->namespace($this->namespace)
  68. // ->group(base_path('routes/game.php'));
  69. }
  70. // protected function singlePlayRoutes(){
  71. // Route::prefix('catest')
  72. // ->namespace($this->namespace)
  73. // ->group(base_path('routes/single.php'));
  74. // Route::prefix('far')
  75. // ->namespace($this->namespace)
  76. // ->group(base_path('routes/single.php'));
  77. // Route::prefix('sup')
  78. // ->namespace($this->namespace)
  79. // ->group(base_path('routes/single.php'));
  80. // Route::prefix('hallo')
  81. // ->namespace($this->namespace)
  82. // ->group(base_path('routes/single.php'));
  83. // Route::prefix('ca')
  84. // ->namespace($this->namespace)
  85. // ->group(base_path('routes/single.php'));
  86. // Route::prefix('check')
  87. // ->namespace($this->namespace)
  88. // ->group(base_path('routes/single.php'));
  89. // }
  90. /**
  91. * Define the "api" routes for the application.
  92. *
  93. * These routes are typically stateless.
  94. *
  95. * @return void
  96. */
  97. protected function mapApiRoutes()
  98. {
  99. Route::prefix('api')
  100. ->middleware('filter26')
  101. ->middleware('cors')
  102. ->namespace($this->namespace)
  103. ->group(base_path('routes/api.php'));
  104. // Route::prefix('redstorm')
  105. // ->middleware('filter26')
  106. // ->namespace($this->namespace)
  107. // ->group(base_path('routes/api.php'));
  108. //
  109. // Route::prefix('tig')
  110. // ->middleware('filter26')
  111. // ->middleware('EncryptInOut')
  112. // ->namespace($this->namespace)
  113. // ->group(base_path('routes/api.php'));
  114. }
  115. }