Skip to content

Commit 72b6f4c

Browse files
[7.x] Fix 'tmp' directory creation (#31680)
* fix 'tmp' directory creation * Update Component.php Co-authored-by: Taylor Otwell <[email protected]>
1 parent 7a5a523 commit 72b6f4c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/View/Component.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ protected function createBladeViewFromString($factory, $contents)
8181
);
8282

8383
if (! file_exists($viewFile = $directory.'/'.sha1($contents).'.blade.php')) {
84+
if (! is_dir($directory)) {
85+
mkdir($directory, 0755, true);
86+
}
87+
8488
file_put_contents($viewFile, $contents);
8589
}
8690

0 commit comments

Comments
 (0)