Hello, I have a directory that has an unknown number of blade files inside it, I wish to include every single file in that directory in my main view. I had the idea of making a custom blade directive, and have that directive scan that folder, loop through the filenames, and echo the rendered view (something like echo (View::make("myfile")) Seems simple enough. But to my surprise, some weird unexpected behaviors started happening, my original view sometimes got repeated in a loop, sometimes the whole page froze and really unpredictable things started to occur because of that filter and it never rendered the views or printed them.
So any idea on how to make what I want happen? (include all the files in a given directory)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community