pennant-development

Automate Pennant feature-flag management for Laravel applications.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/elab-development/internet-tehnologije-2025-vebservisieuprave_2022_0031 --skill pennant-development-elab-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pennant-development
Source: https://github.com/elab-development/internet-tehnologije-2025-vebservisieuprave_2022_0031/tree/main/backend/vendor/laravel/boost/.ai/pennant/skill/pennant-development
Command: npx skills add https://github.com/elab-development/internet-tehnologije-2025-vebservisieuprave_2022_0031 --skill pennant-development-elab-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pennant-based feature flags are essential to progressively enable features, test changes safely, and tailor UX in Laravel apps.

Core Features & Use Cases

  • Define features with Pennant and conditionally enable them per user or role.
  • Render UI conditionally via @feature blade directive for dynamic UX.
  • Implement A/B testing and gradual rollouts to minimize risk during deployment.

Quick Start

To start using Pennant in a Laravel project:

  1. Install Pennant: composer require laravel/pennant
  2. Define a feature: Feature::define('new-dashboard', function ($user) { return $user->isAdmin(); });
  3. Use in Blade: @feature('new-dashboard') <x-new-dashboard /> @else <x-old-dashboard /> @endfeature

Frequently Asked Questions about pennant-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement feature flags in Laravel for progressive rollouts?

To implement feature flags in Laravel, install Pennant via composer, define features using Feature::define, evaluate active states across user scopes, and conditionally render UI with the @feature blade directive for safe progressive rollouts.

Can I use the @feature blade directive for A/B testing in Laravel?

Yes, the @feature blade directive supports A/B testing by conditionally rendering UI components based on active feature states, allowing you to display different views to different user scopes and minimize risk during deployment.

What is scope-based activation for feature flags in a PHP environment?

Scope-based activation evaluates feature flags per user or role within a PHP environment, allowing features to be conditionally enabled for specific scopes rather than globally, ensuring tailored UX and controlled rollouts.

How do I check if a Pennant feature flag is active for a specific user?

You check if a Pennant feature flag is active by defining it with a closure that accepts a user parameter, returning true or false based on user attributes like isAdmin, which evaluates the active state for that specific scope.

Do I need to install Laravel Pennant separately to manage feature toggles?

Yes, you need to install Laravel Pennant separately using composer require laravel/pennant, as it is a dedicated package for managing feature toggles, conditional rendering, and A/B testing within your Laravel application.

When should I use Pennant feature flags instead of environment variables in Laravel?

Use Pennant feature flags instead of environment variables when you need scope-based activation per user or role, runtime toggling, and A/B testing capabilities, rather than simple global on/off application configuration.