public function toArray()
    {
        return [
            'id' => $this->id,
            'modelType' => $this->model_type,
            'modelId' => $this->model_id,
            'name' => $this->name,
            'price' => $this->price,
            'image' => $this->image,
            'quantity' => $this->quantity,
        ];
    }
public function toArray()
    {
        return [
            'id' => $this->id,
            'modelType' => $this->model_type,
            'modelId' => $this->model_id,
            'name' => $this->name,
            'price' => $this->price,
            'image' => $this->image,
            'quantity' => $this->quantity,
        ];
    }
public function toArray ( ) { return [ 'id' => $ this -> id , 'modelType' => $ this -> model_type , 'modelId' => $ this -> model_id , 'name' => $ this -> name , 'price' => $ this -> price , 'image' => $ this -> image , 'quantity' => $ this -> quantity , ] ; }
This method is put to convert snake case in camelCase.

@return array
This method is put to convert snake case in camelCase .