Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Geser's avatar
Level 2

Subscribe+Register on same page

I've been getting to know Laravel for a few months now and am enjoying customizing and extending Spark. I want to shorten the sign-up process for new subscribers by putting the "<spark-subscribe-stripe>" form on the "register" page. I've written other custom Vue components and they are behaving as expected, but my attempts to do something like this https://www.summitform.com/register (one page with subscribe/credit-card, register forms) aren't working.

It seems like it should be easy... the Spark docs don't seem to cover how to do this. Has anyone got a solution or hint what I'm missing? (I'll keep reading through the Spark docs + code)

0 likes
5 replies
Geser's avatar
Level 2

Looks like "./spark/resources/views/auth/register-common.blade.php" could be what I'm looking for... now... how to set up a route (and a ".blade.php" for the page that will contain it)?

Geser's avatar
Level 2

Need to have called "SparkServiceProvider::booted()" in order to have initialized the plans before showing the "register" form ..(?)

Geser's avatar
Level 2

Chicken + Egg problem. Subscribe Form wants a User to be defined. Instead of re-using the forms/components, will try copying the code from the 2 forms (subscribe + register) and creating a new one.

Geser's avatar
Level 2

I'm trying to trigger the display of the register form by passing in the requisite data:

    public function showSubscribe()
    {
        $plans = Spark::plans();
        return view('spark::auth.register', ['plans' => $plans]);
    }

...but the Chrome Inspector/Debugger of the Vue component shows that "plans: Array[0]", so the data isn't being passed through in this way (I've used the PHP Debugger to verify that Spark::plans() returns a non-empty array).

Geser's avatar
Geser
OP
Best Answer
Level 2

OMG. The Spark docs seriously need a search feature. I just found that all I wanted was to not call "Spark::noCardUpFront()" in "SparkServiceController::booted()". (Can I have my 3hrs back please)

1 like

Please or to participate in this conversation.