laravel-db-blade-compiler
laravel-db-blade-compiler copied to clipboard
file_put_contents failed to open stream: No such file or directory
Hi, after installation, and running:
DbView::make($this)->field('email_subject')->with($data)->render();
I get the following error
file_put_contents(../app/db-blade-compiler/views/b92b4b7d77cc4fdc95e46a0d6e471b5e):
failed to open stream: No such file or directory
I can fix this by manually creating the folder /app/db-blade-compiler/views. I have cache set to false in config
Using Laravel 8,0, latest version of this package
Encountered the same issue numerous times with different combinations of the compiler (and laravel). Maybe it would be nice to have the compiled directory as a config parameter?
Or another option would be to make sure the directory exists and if it doesn't create it.
I ran into the same issue. I just have this set above:
if (! Storage::exists('db-blade-compiler/views')) {
Storage::makeDirectory('db-blade-compiler/views');
}
However, I shouldn't have to do this. It's weird that it doesn't even check within the package itself.