3

I'm using Laravel Spark (not classic, v11) to scaffold out my newest SaaS application. Everything is going well, but the only thing I'm not able to customize is the "Return to [Application Link]" once users are actually in the billing portal.

Right now, it defaults to www.example.com, which returns users to my home page. Instead, I'd like it to return users to www.example.com/dashboard.

I've read every page of the documentation thoroughly, but don't see any sort of default customization built in for this.

I'm using Spark-Stripe (as opposed to Spark-Paddle) if it makes a difference, though I don't think it would.

Thanks in advance.

mck
  • 40,932
  • 13
  • 35
  • 50

1 Answers1

4

That URL should default to /dashboard, but you can customize it by adding this line to your spark.php config file:

'dashboard_url' => '/dashboard',

For more details on how Spark is using this config value, see these files:

../vendor/laravel/spark-stripe/src/FrontendState.php
../vendor/laravel/spark-stripe/resources/js/Pages/BillingPortal.vue
Kevin Marsden
  • 677
  • 1
  • 10
  • 17
  • 1
    Thank you kind stranger! This is exactly what I needed. I'm surprised this wasn't included in the documentation. Thank you very very much. – Bryce Matheson Jun 24 '21 at 17:10