src/Concerns/InteractsWithElements.php
public function attach($field, $path)
    {
        $element = $this->resolver->resolveForAttachment($field);

        $element->setFileDetector(new LocalFileDetector)->sendKeys($path);

        return $this;
    }
public function attach($field, $path)
    {
        $element = $this->resolver->resolveForAttachment($field);

        $element->setFileDetector(new LocalFileDetector)->sendKeys($path);

        return $this;
    }
public function attach ( $ field , $ path ) { $ element = $ this -> resolver -> resolveForAttachment ( $ field ) ; $ element -> setFileDetector ( new LocalFileDetector ) -> sendKeys ( $ path ) ; return $ this ; }
Attach the given file to the field.

@param  string  $field
@param  string  $path
@return $this
Attach the given file to the field .