Source: juststeveking.uk

Laravel Pennant
Laravel Pennant is a package created by the Laravel team that will arrive with https://laravel-news.com/laravel-10 provides Feature Flags for your applications. Feature flags enable you to incrementally roll out new application features with confidence, A/B test new interface designs, compliment a trunk-based development strategy, and much more.

Creating a new feature is a simple process of defining it with your AppServiceProvider like so: public function boot(): void { Feature::define('beta-testers', fn (User $user) => match (true) { $user->isBetaTester() => true, default => false, }); }

However, you can also use a class-based approach to your features: class BetaTesters { public function resolve(User $user): mixed { return match (true) { $user->isBetaTester() => true, default => false, }; }}

class PodcastController { public function __construct( private readonly RedirectAction $action, ) {} public function index(Request $request): Response { return Feature::when(BetaTester::class, fn () => $this->action->handle('v2'), fn () => $this->action->handle('v1'), ); }}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners