123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- <?php
- namespace App\Providers;
- use Illuminate\Support\Facades\Route;
- use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
- class RouteServiceProvider extends ServiceProvider
- {
- /**
- * This namespace is applied to your controller routes.
- *
- * In addition, it is set as the URL generator's root namespace.
- *
- * @var string
- */
- protected $namespace = 'App\Http\Controllers';
- /**
- * Define your route model bindings, pattern filters, etc.
- *
- * @return void
- */
- public function boot()
- {
- //
- parent::boot();
- }
- /**
- * Define the routes for the application.
- *
- * @return void
- */
- public function map()
- {
- $this->mapApiRoutes();
- $this->mapWebRoutes();
- $this->mapCallbacksRoutes();
- $this->mapGoodnightRoutes();
- $this->mapShareRoutes();
- $this->mapPairRoutes();
- $this->mapAdminRoutes();
- $this->mapAppRoutes();
- $this->mapDeedRoutes();
- $this->mapFriendRoutes();
- $this->mapGteamRoutes();
- $this->mapCommonRoutes();
- $this->mapMediaRoutes();
- $this->mapUserRoutes();
- $this->mapHomeRoutes();
- $this->mapLogRoutes();
- $this->mapAuthRoutes();
- $this->mapPayRoutes();
- $this->mapSyjRoutes();
- $this->mapLikeInviteRoutes();
- $this->mapOpenidRoutes();
- $this->mapQQprogramRoutes();
- $this->mapSignRoutes();
- $this->mapChargePartnerRoutes();
- $this->mapStubApiRoutes();
- }
- /**
- * Define the "web" routes for the application.
- *
- * These routes all receive session state, CSRF protection, etc.
- *
- * @return void
- */
- protected function mapWebRoutes()
- {
- Route::namespace($this->namespace)
- ->middleware('web')
- ->group(base_path('routes/web.php'));
- }
- /**
- * Define the "api" routes for the application.
- *
- * These routes are typically stateless.
- *
- * @return void
- */
- protected function mapApiRoutes()
- {
- Route::prefix('api')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/api.php'));
- }
- protected function mapCallbacksRoutes()
- {
- Route::namespace($this->namespace)
- ->group(base_path('routes/callbacks.php'));
- }
- protected function mapGoodnightRoutes()
- {
- Route::prefix('api/goodnight')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/goodnight.php'));
- }
- protected function mapShareRoutes()
- {
- Route::prefix('api/share')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/share.php'));
- }
- protected function mapPairRoutes()
- {
- Route::prefix('api/pair')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/pair.php'));
- }
- protected function mapAdminRoutes()
- {
- Route::prefix('api/admin')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/admin.php'));
- }
- protected function mapAppRoutes()
- {
- Route::prefix('api/app')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/app.php'));
- }
- protected function mapDeedRoutes()
- {
- Route::prefix('api/deed')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/deed.php'));
- }
- protected function mapFriendRoutes()
- {
- Route::prefix('api/friend')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/v2_17_3/friend.php'));
- }
- protected function mapGteamRoutes()
- {
- Route::prefix('api/gteam')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/gteam.php'));
- }
- protected function mapCommonRoutes()
- {
- Route::prefix('api/common')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/common.php'));
- }
- protected function mapMediaRoutes()
- {
- Route::prefix('api/media')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/media.php'));
- }
- protected function mapUserRoutes()
- {
- Route::prefix('api/user')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/user.php'));
- }
- protected function mapHomeRoutes()
- {
- Route::prefix('api/home')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/home.php'));
- }
- protected function mapLogRoutes()
- {
- Route::prefix('api/log')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/log.php'));
- }
- protected function mapAuthRoutes()
- {
- Route::prefix('api/auth')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/auth.php'));
- }
- protected function mapPayRoutes()
- {
- Route::prefix('api/pay')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/pay.php'));
- }
- protected function mapSyjRoutes()
- {
- Route::prefix('api/syj')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/syj.php'));
- }
- protected function mapLikeInviteRoutes()
- {
- Route::prefix('api/likeinvite')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/likeinvite.php'));
- }
- protected function mapOpenidRoutes()
- {
- Route::prefix('api/openid')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/openid.php'));
- }
- protected function mapQQprogramRoutes()
- {
- Route::prefix('api/qqprogram')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/qqprogram.php'));
- }
- protected function mapSignRoutes()
- {
- Route::prefix('api/sign')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/sign.php'));
- }
- protected function mapChargePartnerRoutes()
- {
- Route::prefix('')
- ->namespace($this->namespace)
- ->middleware('api')
- ->group(base_path('routes/chargePartner.php'));
- }
- protected function mapStubApiRoutes()
- {
- Route::prefix('stub-api')
- ->namespace('App\Generated\Controllers')
- ->middleware('stub-api')
- ->group(base_path('routes/generated_routes.php'));
- }
- }
|