- Edited
Hi
this code gives 3 warnings:
$rdi = new RecursiveDirectoryIterator(app_path('Helpers'.DIRECTORY_SEPARATOR.'Global'));
$it = new RecursiveIteratorIterator($rdi);
while ($it->valid()) {
if (
! $it->isDot() &&
$it->isFile() &&
$it->isReadable() &&
'php' === $it->current()->getExtension() &&
mb_strpos($it->current()->getFilename(), 'Helper')
) {
require $it->key();
}
$it->next();
}