•
3 min read
Extending Laravel container bindings
If you want to decorate something bound to the container in Laravel you can extend
it. This allows you to pipe the value through some particular changes without having to re-bind the original value.
Notice in the example below we extend a value (22) bound to the container via the ‘twenty-two’ key and then extend it again referencing the previously bound value.