Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
plan-craft-development
plan-craft-development
realrashid/plan-craft
claude-code
plan-craft
subscriptions
plan-config
feature-access
eligibility-checks
migrations

Manage subscriptions and user eligibility using configuration-driven plans, the HasPlan trait, and dynamic feature checking.

Install
php artisan boost:add-skill realrashid/plan-craft

Save this content to: .claude/skills/plan-craft-development/SKILL.md

# 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

```bash
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

```php
use RealRashid\PlanCraft\Traits\HasPlan;

class User extends Authenticatable
{
    use HasPlan;
}
```

### Checking user eligibility in a controller

```php
public function store(Request $request)
{
    if (! auth()->user()->isEligible('create-posts')) {
        return redirect()->back()->with('error', 'Upgrade your plan to create more posts.');
    }
    
    // Logic to create posts...
}
```

### Subscribing to a plan

```php
$user->subscribeTo('premium'); // 'premium' is defined in config/plan-craft.php
```

## Implementation tips for AI agents

- Store plan definitions in `config/plan-craft.php` for centralized, version-controlled plan management.
- Use `hasFeature('feature-name')` for simple boolean access and `isEligible('action-name')` for numeric limits.
- Ensure the `plan_id` and `plan_details` columns are present in your billable model after runningmigrations.

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
{
    use HasPlan;
}

Checking user eligibility in a controller

public function store(Request $request)
{
    if (! auth()->user()->isEligible('create-posts')) {
        return redirect()->back()->with('error', 'Upgrade your plan to create more posts.');
    }
    
    // Logic to create posts...
}

Subscribing to a plan

$user->subscribeTo('premium'); // 'premium' is defined in config/plan-craft.php

Implementation tips for AI agents

  • Store plan definitions in config/plan-craft.php for centralized, version-controlled plan management.
  • Use hasFeature('feature-name') for simple boolean access and isEligible('action-name') for numeric limits.
  • Ensure the plan_id and plan_details columns are present in your billable model after runningmigrations.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core