I’m using Blande::render() to generate content for my emails: $content = Blade::render(string: $body, data: $placeHolderData, deleteCachedView: true);
but I’m getting a lot of errors like this because I use deleteCachedView: true: unlink(/var/www/html/storage/framework/views/456c7288c355db70f44f3fdca12cd0cd.blade.php): No such file or directory
It works fine when I test it locally but once I moved it to production I’m getting these errors…
If I set deleteCachedView to false am I going to have issues with the cache or filling up: /var/www/html/storage/framework/views/ with data?
I see that is coming from BladeCompiler.php render() (part of Laravel code)
if ($deleteCachedView) {
unlink($view->getPath());
}
It will make more sense to have something like this there:
if ($deleteCachedView && file_exists($view->getPath())) {
unlink($view->getPath());
}
Been searching the internet but I can’t find anyone complaining about this issue, which is very strange
I’m not expecting any errors and I have no idea how to move pass that since it’s not an exception but an E_WARNING and my code keeps failing there
Marius Soaren is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.