public function store($id, $data = array())
    {
        $data = array_merge(
            [self::DIAGNOSTIC_ID => $id],
            $data
        );

        $data = $this->cleanInputData($data);

        $this->openFile();
        $this->update($id, $data);

        return $this;
    }
public function store($id, $data = array())
    {
        $data = array_merge(
            [self::DIAGNOSTIC_ID => $id],
            $data
        );

        $data = $this->cleanInputData($data);

        $this->openFile();
        $this->update($id, $data);

        return $this;
    }
public function store ( $ id , $ data = array ( ) ) { $ data = array_merge ( [ self :: DIAGNOSTIC_ID => $ id ] , $ data ) ; $ data = $ this -> cleanInputData ( $ data ) ; $ this -> openFile ( ) ; $ this -> update ( $ id , $ data ) ; return $ this ; }
Merge id and data array
Clean input data by adding empty column
Open csv and create new entry
@param $id
@param $data
@return $this
Merge id and data array Clean input data by adding empty column Open csv and create new entry