public function hasAttachedFile($name, array $options = [])
    {
        /** @var Model $this */

        /** @var AttachmentFactoryInterface $factory */
        $factory = app(AttachmentFactoryInterface::class);

        $attachment = $factory->create($this, $name, $options);

        $this->attachedFiles[ $name ] = $attachment;
    }
public function hasAttachedFile($name, array $options = [])
    {
        /** @var Model $this */

        /** @var AttachmentFactoryInterface $factory */
        $factory = app(AttachmentFactoryInterface::class);

        $attachment = $factory->create($this, $name, $options);

        $this->attachedFiles[ $name ] = $attachment;
    }
public function hasAttachedFile ( $ name , array $ options = [ ] ) { /** @var Model $this */ /** @var AttachmentFactoryInterface $factory */ $ factory = app ( AttachmentFactoryInterface :: class ) ; $ attachment = $ factory -> create ( $ this , $ name , $ options ) ; $ this -> attachedFiles [ $ name ] = $ attachment ; }
Add a new file attachment type to the list of available attachments.

@param string $name
@param array  $options
Add a new file attachment type to the list of available attachments .