### Activate or Deactivate a Feature
Source: https://github.com/laravel/pennant/blob/1.x/resources/boost/skills/pennant-development/SKILL.md
Manually activate or deactivate feature flags globally or for a specific user.
```php
Feature::activate('new-dashboard');
Feature::for($user)->activate('new-dashboard');
```
--------------------------------
### Define a New Feature Flag
Source: https://github.com/laravel/pennant/blob/1.x/resources/boost/skills/pennant-development/SKILL.md
Use `Feature::define` to create a new feature flag. The closure determines if the feature is active for a given user.
```php
use Laravel\Pennant\Feature;
Feature::define('new-dashboard', function (User $user) {
return $user->isAdmin();
});
```
--------------------------------
### Check if a Feature is Active
Source: https://github.com/laravel/pennant/blob/1.x/resources/boost/skills/pennant-development/SKILL.md
Use `Feature::active` to check if a feature flag is enabled globally or for a specific user using `Feature::for($user)->active`.
```php
if (Feature::active('new-dashboard')) {
// Feature is active
}
// With scope
if (Feature::for($user)->active('new-dashboard')) {
// Feature is active for this user
}
```
--------------------------------
### Use Feature Flag in Blade
Source: https://github.com/laravel/pennant/blob/1.x/resources/boost/skills/pennant-development/SKILL.md
The `@feature` directive in Blade allows conditional rendering based on feature flag status.
```blade
@feature('new-dashboard')
@else
@endfeature
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.