skills/laravel/boost/pennant-development

pennant-development

SKILL.md

Pennant Features

When to Apply

Activate this skill when:

  • Creating or checking feature flags
  • Managing feature rollouts
  • Implementing A/B testing

Documentation

Use search-docs for detailed Pennant patterns and documentation.

Basic Usage

Defining Features

use Laravel\Pennant\Feature;

Feature::define('new-dashboard', function (User $user) {
    return $user->isAdmin();
});

Checking Features

if (Feature::active('new-dashboard')) {
    // Feature is active
}

// With scope
if (Feature::for($user)->active('new-dashboard')) {
    // Feature is active for this user
}

Blade Directive

@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-old-dashboard />
@endfeature

Activating / Deactivating

Feature::activate('new-dashboard');
Feature::for($user)->activate('new-dashboard');

Verification

  1. Check feature flag is defined
  2. Test with different scopes/users

Common Pitfalls

  • Forgetting to scope features for specific users/entities
  • Not following existing naming conventions
Weekly Installs
46
Repository
laravel/boost
GitHub Stars
3.3K
First Seen
Jan 28, 2026
Installed on
codex44
gemini-cli44
opencode44
github-copilot43
cursor43
claude-code42