public function create(array $data){
        $model = $this->model->create($data);
        //check for hasMany
        if($this->validateRelationData($this->withHasMany,'many')){
            $model->{$this->withHasMany['relation']}()->saveMany($this->withHasMany['data']);
        }
        //check for belongsToMany
        if($this->validateRelationData($this->withBelongsToMany,'tomany')){
            $model->{$this->withBelongsToMany['relation']}()->sync($this->withBelongsToMany['data']);
        }
        return $model;
    }