File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public function isolatedRender(string $template): string
1313 {
1414 $ compiler = app ('blade.compiler ' );
1515
16- $ temporaryCachePath = storage_path ('framework/views/blaze/isolated-render ' );
16+ $ temporaryCachePath = storage_path ('framework/views/blaze ' );
1717
1818 File::ensureDirectoryExists ($ temporaryCachePath );
1919
@@ -44,7 +44,11 @@ function ($input) {
4444 ]);
4545
4646 try {
47- $ result = $ compiler ->render ($ template );
47+ // As we are rendering a string, Blade will generate a view for the string in the cache directory
48+ // and it doesn't use the `cachePath` property. Instead it uses the config `view.compiled` path
49+ // to store the view. Hence why our `temporaryCachePath` won't clean this file up. To remove
50+ // the file, we can pass `deleteCachedView: true` to the render method...
51+ $ result = $ compiler ->render ($ template , deleteCachedView: true );
4852
4953 $ result = Unblaze::replaceUnblazePrecompiledDirectives ($ result );
5054 } finally {
You can’t perform that action at this time.
0 commit comments