protected function flatten($input)
    {
        $list = [];

        foreach ($input as $item) {
            $list = array_merge($list, (array)$item);
        }

        return array_unique($list);
    }
protected function flatten($input)
    {
        $list = [];

        foreach ($input as $item) {
            $list = array_merge($list, (array)$item);
        }

        return array_unique($list);
    }
protected function flatten ( $ input ) { $ list = [ ] ; foreach ( $ input as $ item ) { $ list = array_merge ( $ list , ( array ) $ item ) ; } return array_unique ( $ list ) ; }
Turn a 2 dimensional privilege array into a list of privileges

@param array $input
@return array
Turn a 2 dimensional privilege array into a list of privileges