diff --git a/src/Support/Includes.php b/src/Support/Includes.php index 23a0b5ed..08ff8f00 100644 --- a/src/Support/Includes.php +++ b/src/Support/Includes.php @@ -7,11 +7,11 @@ use Hyde\Hyde; use Hyde\Markdown\Models\Markdown; use Illuminate\Support\Facades\Blade; +use Hyde\Framework\Concerns\InteractsWithDirectories; use function basename; use function file_exists; use function file_get_contents; -use function mkdir; /** * The Includes facade provides a simple way to access partials in the includes directory. @@ -20,6 +20,8 @@ */ class Includes { + use InteractsWithDirectories; + /** * @var string The directory where includes are stored. */ @@ -93,11 +95,4 @@ public static function blade(string $filename, ?string $default = null): ?string return Blade::render(file_get_contents($path)); } - - protected static function needsDirectory(string $directory): void - { - if (! file_exists($directory)) { - mkdir($directory, recursive: true); - } - } }