files->isDirectory($path)) { $this->files->makeDirectory($path, 0755, true); } } protected function write(string $path, string $contents, bool $force = false): void { if ($this->files->exists($path) && ! $force) { throw new RuntimeException("File already exists: {$path}"); } $this->createDirectory(dirname($path)); $this->files->put($path, $contents); } protected function studly(string $value): string { return str($value)->studly()->toString(); } protected function snake(string $value): string { return str($value)->snake()->toString(); } protected function kebab(string $value): string { return str($value)->kebab()->toString(); } }