{"record":{"id":"2e4e260eeb52da2b","repo":"filamentphp/filament","slug":"laravel-spark-is-not-installed-2e4e26","errorCode":null,"errorMessage":"Laravel Spark is not installed.","messagePattern":"Laravel Spark is not installed\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/spark-billing-provider/src/SparkBillingProvider.php","lineNumber":24,"sourceCode":"use Filament\\Billing\\Providers\\Http\\Middleware\\VerifySparkBillableIsSubscribed;\nuse Filament\\Facades\\Filament;\nuse Illuminate\\Http\\RedirectResponse;\nuse LogicException;\nuse Spark\\Spark;\n\nclass SparkBillingProvider implements Contracts\\BillingProvider\n{\n    /**\n     * @return string | Closure | array<class-string, string>\n     */\n    public function getRouteAction(): string | Closure | array\n    {\n        return function (): RedirectResponse {\n            // We cannot explicitly require Spark through Composer, as Stripe\n            // and Paddle integrations have different packages associated\n            // with them. As such, we must check if this class exists.\n            if (! class_exists(Spark::class)) {\n                throw new LogicException('Laravel Spark is not installed.');\n            }\n\n            $tenant = Filament::getTenant();\n\n            return redirect()->route('spark.portal', [\n                'id' => $tenant->getKey(),\n                'type' => (fn (): string => $this->type)->call(Spark::billable($tenant::class)),\n            ]);\n        };\n    }\n\n    public function getSubscribedMiddleware(): string\n    {\n        return VerifySparkBillableIsSubscribed::class;\n    }\n}\n","sourceCodeStart":6,"sourceCodeEnd":41,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/spark-billing-provider/src/SparkBillingProvider.php#L6-L41","documentation":"Error \"Laravel Spark is not installed.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/spark-billing-provider/src/SparkBillingProvider.php:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}