Spatie\SlashCommand\AttachmentField::create PHP Method

create() public static method

public static create ( $title, $value )
    public static function create($title, $value)
    {
        return new static($title, $value);
    }

Usage Example

 protected function getCommandListAttachment(Collection $handlers) : Attachment
 {
     $attachmentFields = $handlers->map(function (SignatureHandler $handler) {
         return AttachmentField::create($handler->getFullCommand(), $handler->getDescription());
     })->all();
     return Attachment::create()->setColor('warning')->setTitle('Did you mean:')->setFields($attachmentFields);
 }
All Usage Examples Of Spatie\SlashCommand\AttachmentField::create