protected function queueNames($supervisors, $queue = null)
    {
        $queues = $supervisors->map(function ($supervisor) {
            return array_keys($supervisor->processes);
        })->collapse()->unique()->values();

        return $queue ? $queues->intersect([$queue]) : $queues;
    }
protected function queueNames($supervisors, $queue = null)
    {
        $queues = $supervisors->map(function ($supervisor) {
            return array_keys($supervisor->processes);
        })->collapse()->unique()->values();

        return $queue ? $queues->intersect([$queue]) : $queues;
    }
protected function queueNames ( $ supervisors , $ queue = null ) { $ queues = $ supervisors -> map ( function ( $ supervisor ) { return array_keys ( $ supervisor -> processes ) ; } ) -> collapse ( ) -> unique ( ) -> values ( ) ; return $ queue ? $ queues -> intersect ( [ $ queue ] ) : $ queues ; }
Get all of the queue names.

@param  \Illuminate\Support\Collection  $supervisors
@param  string|null  $queue
@return \Illuminate\Support\Collection
Get all of the queue names .