toOptionArray() as $item) { $array[$item['value']] = $item['label']; } return $array; } /** * @return array */ public function toOptionArray() { return [ [ 'value' => static::ONCE, 'label' => __('Once'), ], [ 'value' => static::EVERYTIME, 'label' => __('Everytime'), ], [ 'value' => static::RANDOM, 'label' => __('Random'), ], ]; } }