protected function getDefineDatas($class)
    {
        $class = is_string($class) ? $class : get_class($class);
        $id = $this->request->has('parent') && $this->request->parent != 0 ? $this->request->parent : $this->request->related;
        $parent = $class::findOrFail($id);
        $datas = $this->request->all();
        foreach($this->defineValues as $value) {
            $datas[$value] = $parent->$value;
        }
        return $datas;
    }
protected function getDefineDatas($class)
    {
        $class = is_string($class) ? $class : get_class($class);
        $id = $this->request->has('parent') && $this->request->parent != 0 ? $this->request->parent : $this->request->related;
        $parent = $class::findOrFail($id);
        $datas = $this->request->all();
        foreach($this->defineValues as $value) {
            $datas[$value] = $parent->$value;
        }
        return $datas;
    }
protected function getDefineDatas ( $ class ) { $ class = is_string ( $ class ) ? $ class : get_class ( $ class ) ; $ id = $ this -> request -> has ( 'parent' ) && $ this -> request -> parent != 0 ? $ this -> request -> parent : $ this -> request -> related ; $ parent = $ class :: findOrFail ( $ id ) ; $ datas = $ this -> request -> all ( ) ; foreach ( $ this -> defineValues as $ value ) { $ datas [ $ value ] = $ parent -> $ value ; } return $ datas ; }
get the define datas

@param $class
@return array
get the define datas