src/Entities/Orders/ScheduleOption.php
public function getTimeOptions($interval)
    {
        $min = Carbon::parse($this->getMin());
        $max = Carbon::parse($this->getMax());
        $options = [];

        // Round up to the closest interval
        while ($min->minute % $interval != 0) {
            $min->addMinute();
        }

        // Add options foreach interval
        while ($min->lte($max)) {
            $options[] = $min->copy();
            $min->addMinutes($interval);
        }

        return $options;
    }
public function getTimeOptions($interval)
    {
        $min = Carbon::parse($this->getMin());
        $max = Carbon::parse($this->getMax());
        $options = [];

        // Round up to the closest interval
        while ($min->minute % $interval != 0) {
            $min->addMinute();
        }

        // Add options foreach interval
        while ($min->lte($max)) {
            $options[] = $min->copy();
            $min->addMinutes($interval);
        }

        return $options;
    }
@param int $interval In minutes

@return array|Carbon