Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Add support for multiple features in the middleware #2

Conversation

joelbutcher
Copy link
Contributor

This PR add's multi-feature support to HasFeature middleware, using Laravel's comma-separated argument syntax when defining middleware on the route:

use App\Http\Controllers\FooController;
use RyanChandler\LaravelFeatureFlags\Middleware\HasFeature;

Route::get('foo', [FooController::class, 'index')->middleware(HasFeature::class, . ':foo,bar');

@ryangjchandler
Copy link
Owner

Thanks @joelbutcher!

@ryangjchandler ryangjchandler merged commit b7ade97 into ryangjchandler:main Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants