我尝试在我的laravel模型方法中调用PHP' s RecursiveIteratorIterator
如下
$columns = new RecursiveIteratorIterator(new RecursiveArrayIterator($feeds));
但我得到
Class 'App\Models\RecursiveIteratorIterator' not found
如何在我的模型中包含通常应该可访问的
找到它
use \RecursiveIteratorIterator;
use \RecursiveArrayIterator;
答案 0 :(得分:-1)
试试这个例子:
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($PATH)) as $filename) {
echo $filename."<br>";
}