public function boot()
    {
        // Publish the cors.php to laravel config dir.
        $this->publishes([__DIR__.'/../../../config/laravel.php' => config_path('cors.php')]);

        $kernel = $this->app->make(Kernel::class);
        // When the Cors middleware is not attached globally.
        if (!$kernel->hasMiddleware(CorsMiddleware::class)) {
            $kernel->prependMiddleware(CorsMiddleware::class);
        }
    }