protected function uploadFile($options)
    {
        if ( $options['type'] === 'file' ) {
            $this->repo = new FileRepository($options);
            $this->hasFile = true;
        } else {
            $this->repo = new ImageRepository($options);
            $this->hasPhoto = true;
        }

        if ( ! $this->repo->upload($this->model, $this->request) ) {
            return false;
        }

        return $this->repo->getDatas($this->request);
    }
protected function uploadFile($options)
    {
        if ( $options['type'] === 'file' ) {
            $this->repo = new FileRepository($options);
            $this->hasFile = true;
        } else {
            $this->repo = new ImageRepository($options);
            $this->hasPhoto = true;
        }

        if ( ! $this->repo->upload($this->model, $this->request) ) {
            return false;
        }

        return $this->repo->getDatas($this->request);
    }
protected function uploadFile ( $ options ) { if ( $ options [ 'type' ] === 'file' ) { $ this -> repo = new FileRepository ( $ options ) ; $ this -> hasFile = true ; } else { $ this -> repo = new ImageRepository ( $ options ) ; $ this -> hasPhoto = true ; } if ( ! $ this -> repo -> upload ( $ this -> model , $ this -> request ) ) { return false ; } return $ this -> repo -> getDatas ( $ this -> request ) ; }
upload file or files

@param array $options
@return array|boolean
upload file or files