diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index b704a42cc4..f7f45d0f6e 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,25 +1,10 @@ mapWebRoutes(); - $this->mapApiRoutes(); - // - } + $this->mapWebRoutes(); - /** - * Define the "api" routes for the application. - * - * These routes are typically stateless. - * - * @return void - */ - protected function mapApiRoutes() - { - Route::group( - [ - 'middleware' => 'api', - 'namespace' => $this->namespace, - 'prefix' => 'api', - ], function ($router) { - require base_path('routes/api.php'); - } - ); + // } /** @@ -86,13 +51,23 @@ class RouteServiceProvider extends ServiceProvider */ protected function mapWebRoutes() { - Route::group( - [ - 'middleware' => 'web', - 'namespace' => $this->namespace, - ], function ($router) { - require base_path('routes/web.php'); - } - ); + Route::middleware('web') + ->namespace($this->namespace) + ->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') + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/api.php')); } } diff --git a/public/index.php b/public/index.php index dbab349937..4584cbcd6a 100644 --- a/public/index.php +++ b/public/index.php @@ -1,15 +1,13 @@ */ -declare(strict_types=1); +define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- @@ -19,11 +17,11 @@ declare(strict_types=1); | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual -| loading any of our classes later on. It feels nice to relax. +| loading any of our classes later on. It feels great to relax. | */ -require __DIR__ . '/../bootstrap/autoload.php'; +require __DIR__.'/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- @@ -37,7 +35,7 @@ require __DIR__ . '/../bootstrap/autoload.php'; | */ -$app = require_once __DIR__ . '/../bootstrap/app.php'; +$app = require_once __DIR__.'/../bootstrap/app.php'; /* |-------------------------------------------------------------------------- diff --git a/public/web.config b/public/web.config new file mode 100644 index 0000000000..624c1760fc --- /dev/null +++ b/public/web.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + +