public function put($contents, $callback, $extension = '') { $path = $this->tempPath . '/' . Str::quickRandom(32) . $extension; $this->filesystem->put($path, $contents); $result = $callback($path); $this->filesystem->delete($path); return $result; }