I'm having this exact same issue. Did you ever find a solution?
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.
Please or to participate in this conversation.