diff --git a/src/Illuminate/Support/Manager.php b/src/Illuminate/Support/Manager.php index ebd95c85a03c..b230c286575f 100755 --- a/src/Illuminate/Support/Manager.php +++ b/src/Illuminate/Support/Manager.php @@ -75,7 +75,21 @@ public function driver($driver = null) // If the given driver has not been created before, we will create the instances // here and cache it so we can return it next time very quickly. If there is // already a driver created by this name, we'll just return that instance. - return $this->drivers[$driver] ??= $this->createDriver($driver); + return $this->drivers[$driver] ??= $this->decorateInstance( + $this->createDriver($driver), $driver + ); + } + + /** + * Optionally decorate a driver instance. + * + * @param mixed $instance + * @param string $driver + * @return mixed + */ + protected function decorateInstance($instance, $driver) + { + return $instance; } /**