laravel avatar

Pennant Development

Handles Laravel Pennant feature flags from definition through deployment. You get helpers for defining flags with closures or class-based features in app/Features, checking them with Feature::active() or the @feature Blade directive, and scoping to specific users or teams. Covers the practical stuff like protecting routes, A/B testing, gradual rollouts, and building custom storage drivers. The verification steps are basic but the common pitfalls note about scoping is honest. If you're managing feature toggles in Laravel and want to use the official package instead of rolling your own conditionals, this gives you the patterns without having to dig through docs.

skills.sh installs
265
GitHub stars
3.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add laravel/boost --skill pennant-development --agent claude-code

Installs into .claude/skills of the current project.

Files

Pennant features

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 and deactivating

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

Verification

  1. Check that the feature flag is defined
  2. Test with different scopes and users

Common pitfalls

  • Forgetting to scope features for specific users or other entities
  • Not following existing naming conventions

Sponsors

Details

Repository
github.com/laravel/boost
Categories
Backend & APIs, Testing & QA, Security, PHP & Laravel
First seen
Jun 3, 2026

More from laravel/boost

All 5
1yonatangross avatarvite-advancedyonatangross/orchestkitAdvanced Vite 8 patterns including Rolldown-powered builds, advancedChunks, Environment API, plugin development, SSR configuration, library mode, and build opti265skills.sh installs
2davila7 avatarmeme-factorydavila7/claude-code-templatesGenerate memes using the memegen.link API. Use when users request memes, want to add humor to content, or need visual aids for social media. Supports 100+ popul264skills.sh installs
3kcchien avatarclawpilotkcchien/clawpilotExpert skill for OpenClaw (v2026.2.19) — self-hosted AI gateway connecting chat apps (WhatsApp, Telegram, Discord, Slack, iMessage, Signal, LINE, Matrix, Teams,264skills.sh installs
4patricio0312rev avatarhot-reload-optimizerpatricio0312rev/skillsOptimizes hot module replacement and fast refresh for development speed with Vite, Next.js, and webpack configurations. Use when users request "hot reload", "HM264skills.sh installs
5patricio0312rev avatartanstack-query-setuppatricio0312rev/skillsImplements TanStack Query (React Query) for server state management with caching, mutations, optimistic updates, and infinite queries. Use when users request "r264skills.sh installs
6ccheney avatarmodern-javascriptccheney/robust-skillsProactively apply when creating web applications, Node.js services, or any JavaScript project. Triggers on JavaScript, ES6, ES2020, ES2022, ES2024, ES2025, ES20263skills.sh installs