Caffeinated\Modules\Repositories\Repository::getAllBasenames PHP Method

getAllBasenames() protected method

Get all module basenames.
protected getAllBasenames ( ) : array
return array
    protected function getAllBasenames()
    {
        $path = $this->getPath();
        try {
            $collection = collect($this->files->directories($path));
            $basenames = $collection->map(function ($item, $key) {
                return basename($item);
            });
            return $basenames;
        } catch (\InvalidArgumentException $e) {
            return collect([]);
        }
    }