public function transform($option)
    {
        $options = $this->entityToArray(OptionCategory::class, $option);
        $data    = ['data' => []];
        foreach ($options as $option) {
            $data['data'][] = [
                'key' => $option,
            ];
        }

        return $data;
    }
public function transform($option)
    {
        $options = $this->entityToArray(OptionCategory::class, $option);
        $data    = ['data' => []];
        foreach ($options as $option) {
            $data['data'][] = [
                'key' => $option,
            ];
        }

        return $data;
    }
public function transform ( $ option ) { $ options = $ this -> entityToArray ( OptionCategory :: class , $ option ) ; $ data = [ 'data' => [ ] ] ; foreach ( $ options as $ option ) { $ data [ 'data' ] [ ] = [ 'key' => $ option , ] ; } return $ data ; }
Transforms option category entity

@param array $option OptionCategory entity

@return array
Transforms option category entity