getConfigFile(); if (!$this->config) { $this->config = Config::get($this->configFile . '.stores.' . $this->name, []); } $handle = Container::getInstance()->invokeClass($class, [$this->name, $this->config, $this->configFile]); $this->config = []; return $handle; } protected function resolveClass(string $type): string { $studly = Str::studly($type); $class = $this->namespace . $studly . '\\Driver'; if (class_exists($class)) { return $class; } $class = $this->namespace . $studly; if (class_exists($class)) { return $class; } throw new \InvalidArgumentException("Driver [{$type}] not supported."); } }