Extend a defined service Closure by wrapping the existing one with a new Closure. This works very similar to a decorator pattern. Note that this only works on service Closures that have been defined in the current Provider, not parent providers.
Signature
public function extend(string
$key,
Closure
$callable )
Parameters
$key
The unique identifier for the Closure or property.