Skip to content

PHP code snippet – How get all files name in one folder in laravel?

        $filesName = \File::files(base_path().'\database\migrations\\');
        $arr = [];
        foreach ($filesName as $file) {
            $ex = explode("\\"  , $file);
            array_push($arr , $ex[count($ex) - 1]);
        }
See also  How to set the return value of a function in Python?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.