diff --git a/Config/config.php b/Config/config.php index 3e94983..5fd676c 100644 --- a/Config/config.php +++ b/Config/config.php @@ -2,6 +2,10 @@ return [ 'name' => 'LaravelPWA', + + // The middleware that will be applied to the offline page and manifest. + 'middleware' => ['web'], + 'manifest' => [ 'name' => env('APP_NAME', 'My PWA App'), 'short_name' => 'PWA', diff --git a/Console/DeployManifest.php b/Console/Commands/DeployManifest.php similarity index 100% rename from Console/DeployManifest.php rename to Console/Commands/DeployManifest.php diff --git a/Providers/RouteServiceProvider.php b/Providers/RouteServiceProvider.php index 099d78c..a42817f 100644 --- a/Providers/RouteServiceProvider.php +++ b/Providers/RouteServiceProvider.php @@ -34,7 +34,7 @@ public function before(Router $router) */ public function map(Router $router) { - \Route::group(['middleware' => 'web', 'namespace' => $this->rootUrlNamespace], function() + \Route::group(['middleware' => config('laravelpwa.middleware', ['web']), 'namespace' => $this->rootUrlNamespace], function() { require __DIR__ . '/../Http/routes.php'; });