Skip to content

What's New in Bag 2.1

Stripping Extra Parameters

Version 2.1 adds support for stripping extra parameters when creating Bag instances to avoid errors.

Prior to 2.1, Bag would throw an exception if you passed in unknown parameters.

To solve this, the addition of the \Bag\Attributes\StripExtraParameters attribute can be used, either on the class or when using the Laravel controller injection feature.

In addition to explicitly opting into this feature, using the \Bag\Attributes\WithoutValidation attribute or Bag::withoutValidation() method will also strip extra parameters.

Made with 🦁💖🏳️‍🌈 by Davey Shafik.