public function determineChildrenPagination($perPage, HasMany $children)
    {
        if ($perPage === false)
        {
            return $children;
        }

        return is_null($perPage) ?
            $children->get() :
            $children->paginate($perPage);
    }
public function determineChildrenPagination($perPage, HasMany $children)
    {
        if ($perPage === false)
        {
            return $children;
        }

        return is_null($perPage) ?
            $children->get() :
            $children->paginate($perPage);
    }
public function determineChildrenPagination ( $ perPage , HasMany $ children ) { if ( $ perPage === false ) { return $ children ; } return is_null ( $ perPage ) ? $ children -> get ( ) : $ children -> paginate ( $ perPage ) ; }
Determines the pagination of children

@param mixed $perPage
@param HasMany $children
@return mixed
Determines the pagination of children