| name | plan-craft-development |
| description | Manage subscriptions and user eligibility using configuration-driven plans, the HasPlan trait, and dynamic feature checking. |
Plan Craft Development
When to use this skill
Use this skill when implementing or modifying subscription-based features, defining user plans, and checking feature access or eligibility in Laravel applications using the realrashid/plan-craft package.
Features
- Publish configuration and migrations (
vendor:publish tags: plan-craft-config, plan-craft-migrations).
- Add subscription capabilities to models using the
RealRashid\PlanCraft\Traits\HasPlan trait.
- Define subscription plans, features, and limits in
config/plan-craft.php.
- Programmatically subscribe, switch, or check eligibility for plans and features.
Examples
Publishing configuration and migrations
php artisan vendor:publish --provider="RealRashid\PlanCraft\PlanCraftServiceProvider" --tag="plan-craft-config"
php artisan vendor:publish --provider="RealRashid\PlanCraft\PlanCraftServiceProvider" --tag="plan-craft-migrations"
Adding subscription to a User model
use RealRashid\PlanCraft\Traits\HasPlan;
class User extends Authenticatable
{
;
}