container->registered('laravel.'.$key)) { return $this->container->resolve('laravel.'.$key); } elseif ($this->container->registered($key)) { return $this->container->resolve($key); } throw new \Exception("Attempting to access undefined property [$key] on application instance."); } }