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

pminkler's avatar

Spark not showing subscription options

For some reason, none of my plans are being displayed in my /settings#/subscription. When I click on 'Subscription', the Vue component is just blank. In the template for the subscriptions, I can dump out the length of the plans, and it's 0.

Also, when registering, I don't see any plans listed.

Looking at the Vue data, the 'plans' array is indeed empty.

Weirder, performing a GET on /spark/plans does show me the plans that I have in my booted function.

Further investigation leads me to an error in getPlans():

getPlans() {
            axios.get('/spark/plans')
                .then(response => {
                    this.plans = this.billingUser
                                    ? _.where(response.data, {type: "user"})
                                    : _.where(response.data, {type: "team"});
                });
        }

It is saying that the _.where is not a function.

[More edits]

Seems like replacing _.where with _.filter works, and this.plans actually has things in it now, but the subscription information still doesn't show up because there are more places that use _.where.

Should I even be trying to change this? Seems like it's a lodash/underscore error that I can version my way out of? My package.json for them is:

    "lodash": "^4.17.4",
    "underscore": "^1.8.3",

[Another edit]

Seems like vendor/laravel/spark/resources/assets/js/spark-bootstrap.js:6 uses underscore...maybe I need to up/downgrade?

window._ = require('underscore');

[Edit again]

Seems like underscore 1.8.3 does have the where function according to http://underscorejs.org/#where. Not sure what is going on?

In my booted method, I have:


public function booted()
    {
        Spark::useStripe()->noCardUpFront()->trialDays(90);

        Spark::freePlan()
            ->features([
                'First', 'Second', 'Third'
            ]);

        Spark::plan('Pro', 'monthly-pro')
            ->price(20)
            ->features([
                'Feature 1',
                'Feature 2',
                'Feature 3',
            ]);
    }

Is there another setting somewhere that determines if plans are going to show up or not? I don't really remember changing much upon installation. It seems like no matter what I change in the booted method, nothing changes for me.

0 likes
6 replies
Aura's avatar

I'm having this exact same issue. Did you ever find a solution?

jhull's avatar

Count me another one as eternally grateful. Installed Lodash to support another feature, only to find Spark blanking out on subscriptions.

Your fix in your write-up worked perfectly!

Thank you.

mailnike's avatar

I am getting same error, not sure why. Subscription page is completely blank while plans are displayed when I fetch them using API. Your writeup link is not working. Could you please share the solution for this issue :( . Thanks.

1 like

Please or to participate in this conversation.