how get all files name in one folder in laravel

Solutions on MaxInterview for how get all files name in one folder in laravel by the best coders in the world

showing results for - "how get all files name in one folder in laravel"
Ffion
23 Oct 2016
1        $filesName = \File::files(base_path().'\database\migrations\\');
2        $arr = [];
3        foreach ($filesName as $file) {
4            $ex = explode("\\"  , $file);
5            array_push($arr , $ex[count($ex) - 1]);
6        }