-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Description
Currently TemplateIterator::findTemplatesInDirectory($dir, $namespace = null) is returning everything from directory because of this line foreach (Finder::create()->files()->followLinks()->in($dir) as $file)
Example
Since this is a template iterator, does it makes sense to filter only template files from directory?Something like this foreach (Finder::create()->name('*.twig')->files()->followLinks()->in($dir) as $file)
This is useful when you want to have in your template directory related assets like *.js or *.css or event whole node_modules
directory.
I can provide a PR with unit tests if you want.