I'm using laravel 5.6, and in my controller I have
use RecursiveIteratorIterator;
and the error I'm getting is
Class 'App\Http\Controllers\RecursiveArrayIterator' not found
So I'm being a little simplistic about it. Obviously RecursiveIteratorIterator is not a laravel function, but rather a core php function. But after reading this post https://laraveldaily.com/how-to-use-external-classes-and-php-files-in-laravel-controller/ I'm still no clearer on where to find it, or how to reference it properly.
I suppose I was expecting that all "native" php functions would just be available?
Help?
use \RecursiveIteratorIterator;Class not founderror?$jsonIterator = new RecursiveIteratorIterator( new RecursiveArrayIterator(json_decode($request, TRUE)), RecursiveIteratorIterator::SELF_FIRST);