Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$user->subscriptionUsage()->record('tempore'); fails #40

Open
Georde opened this issue Aug 6, 2018 · 4 comments
Open

$user->subscriptionUsage()->record('tempore'); fails #40

Georde opened this issue Aug 6, 2018 · 4 comments

Comments

@Georde
Copy link

Georde commented Aug 6, 2018

Invalid plan feature: tempore

tempore exist in database

Don't pass in Feature.php
lines:
41. if (!self::isValid($feature_code)) {
42 throw new InvalidPlanFeatureException($feature_code);
43 }

Laravel 5.6

@gerardojbaez
Copy link
Owner

Hi Georde,

Feature codes are stored in the config file config/laraplans.php under the config key features. You can view an example here. It should work correctly once you define the features in the config file.

I think the documentation is missing the features set up; will have to check.

@Georde
Copy link
Author

Georde commented Aug 6, 2018

But does not it make sense to have registered features in the config if I have dynamic features, I mean that all the features that I register in the database I have to have in this configuration file too?

@gerardojbaez
Copy link
Owner

You must configure your site features before using them. As I have mentioned in my previous comment, all features are defined in the config/laraplans.php file. Laraplans uses this file to validate the features passed and retrieve additional configuration (if needed).

Laraplans does not support dynamic features (i.e., loading them from the database). Any feature used by the site/package must be defined first in the config file.

@Georde
Copy link
Author

Georde commented Aug 6, 2018

ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants