getAttachments() public method

Get the attachments for the message.
public getAttachments ( ) : array
return array
Example #1
0
 /**
  * Get the attachments in array form.
  *
  * @param \Maknz\Slack\Message $message
  * @return array
  */
 protected function getAttachmentsAsArrays(Message $message)
 {
     $attachments = [];
     foreach ($message->getAttachments() as $attachment) {
         $attachments[] = $attachment->toArray();
     }
     return $attachments;
 }