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

thechrise's avatar

Spark::checkPlanEligibilityUsing Not Firing

I'm placing this in the SparkServiveProvider booted function. And I have a Website model that is connected to the team and I can get a count of 1, but even when I use this method without the if statement, and just return false, it's not blocking the subscription downgrade or upgrade. Any help would be much appreciated.

Spark::checkPlanEligibilityUsing(function ($user, $plan) {
            if ($plan->name == 'medium' && count($user->currentTeam->websites) > 0) {
                return false;
            }

            return true;
        });
0 likes
5 replies
hs's avatar

I'm having the same problem. Spark::checkPlanEligibilityUsing() not firing.

ANY HELP would be much appreciated.

Cronix's avatar

You'd have better luck creating an issue on Github

Stockholm's avatar

@thechrise Do you use Team billing? Then you have to change $user to $team...


Spark::checkTeamPlanEligibilityUsing(function ($team, $plan) {

MarkEdmunds's avatar

A bit late to the party, but have you declared the following in the SparkServiceProvider:

use Laravel\Spark\Exceptions\IneligibleForPlan;

If not, that's why.

1 like

Please or to participate in this conversation.