engine/protected/Collection/Collection.php
/**
     * Split a collection into a certain number of groups.
     *
     * @param  int  $numberOfGroups
     * @return static
     */
Split a collection into a certain number of groups.
@param  int  $numberOfGroups
@return static
Split a collection into a certain number of groups . @param int $numberOfGroups @return static
public function split($numberOfGroups)
    {
        if ($this->isEmpty()) {
            return new static;
        }
        $groupSize = ceil($this->count() / $numberOfGroups);
        return $this->chunk($groupSize);
    }
public function split ( $ numberOfGroups ) { if ( $ this -> isEmpty ( ) ) { return new static ; } $ groupSize = ceil ( $ this -> count ( ) / $ numberOfGroups ) ; return $ this -> chunk ( $ groupSize ) ; }
Split a collection into a certain number of groups.
Split a collection into a certain number of groups .