RouteServiceProvider.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
  4. use Illuminate\Support\Facades\Route;
  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. * The path to the "home" route for your application.
  17. *
  18. * @var string
  19. */
  20. public const HOME = '/';
  21. /**
  22. * Define your route model bindings, pattern filters, etc.
  23. *
  24. * @return void
  25. */
  26. public function boot()
  27. {
  28. //
  29. parent::boot();
  30. }
  31. /**
  32. * Define the routes for the application.
  33. *
  34. * @return void
  35. */
  36. public function map()
  37. {
  38. $this->mapApiRoutes();
  39. $this->mapWebRoutes();
  40. //
  41. }
  42. /**
  43. * Define the "web" routes for the application.
  44. *
  45. * These routes all receive session state, CSRF protection, etc.
  46. *
  47. * @return void
  48. */
  49. protected function mapWebRoutes()
  50. {
  51. Route::middleware('web')
  52. ->namespace($this->namespace)
  53. ->group(base_path('routes/web.php'));
  54. Route::middleware('web')
  55. ->namespace($this->namespace)
  56. ->group(base_path('routes/auth.php'));
  57. Route::middleware('web')
  58. ->namespace($this->namespace)
  59. ->group(base_path('routes/images.php'));
  60. Route::middleware('web')
  61. ->namespace($this->namespace)
  62. ->group(base_path('routes/isrQRcode.php'));
  63. Route::middleware('web')
  64. ->namespace($this->namespace)
  65. ->group(base_path('routes/regSTbumi.php'));
  66. Route::middleware('web')
  67. ->namespace($this->namespace)
  68. ->group(base_path('routes/regBTSipfr.php'));
  69. Route::middleware('web')
  70. ->namespace($this->namespace)
  71. ->group(base_path('routes/info.php'));
  72. Route::middleware('web')
  73. ->namespace($this->namespace)
  74. ->group(base_path('routes/info/userManagement.php'));
  75. Route::middleware('web')
  76. ->namespace($this->namespace)
  77. ->group(base_path('routes/info/privillage.php'));
  78. Route::middleware('web')
  79. ->namespace($this->namespace)
  80. ->group(base_path('routes/info/database.php'));
  81. Route::middleware('web')
  82. ->namespace($this->namespace)
  83. ->group(base_path('routes/isrQRcode/qrCodeMap.php'));
  84. Route::middleware('web')
  85. ->namespace($this->namespace)
  86. ->group(base_path('routes/isrQRcode/qrCodeLocation.php'));
  87. Route::middleware('web')
  88. ->namespace($this->namespace)
  89. ->group(base_path('routes/isrQRcode/printQRcode.php'));
  90. Route::middleware('web')
  91. ->namespace($this->namespace)
  92. ->group(base_path('routes/isrQRcode/formInspeksi.php'));
  93. }
  94. /**
  95. * Define the "api" routes for the application.
  96. *
  97. * These routes are typically stateless.
  98. *
  99. * @return void
  100. */
  101. protected function mapApiRoutes()
  102. {
  103. Route::prefix('v1')
  104. ->middleware('api')
  105. ->namespace($this->namespace)
  106. ->group(base_path('routes/api.php'));
  107. }
  108. }