Making your response look good | laravel-slack-slash-command | Spatie

 SPATIE

  Laravel Slack Slash Command
==============================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-slack-slash-command](https://spatie.be/docs/laravel-slack-slash-command/v1)  Usage  Making your response look good

 Version   v1

 Other versions for crawler [v1](https://spatie.be/docs/laravel-slack-slash-command/v1)

  Making your response look good
- [ Introduction ](https://spatie.be/docs/laravel-slack-slash-command/v1/introduction)
- [ Postcardware ](https://spatie.be/docs/laravel-slack-slash-command/v1/postcardware)
- [ Requirements ](https://spatie.be/docs/laravel-slack-slash-command/v1/requirements)
- [ Installation and Setup ](https://spatie.be/docs/laravel-slack-slash-command/v1/installation-and-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-slack-slash-command/v1/questions-and-issues)
- [ Changelog ](https://spatie.be/docs/laravel-slack-slash-command/v1/changelog)
- [ About us ](https://spatie.be/docs/laravel-slack-slash-command/v1/about-us)

Usage
-----

- [ General flow ](https://spatie.be/docs/laravel-slack-slash-command/v1/usage/general-flow)
- [ Sending a basic response ](https://spatie.be/docs/laravel-slack-slash-command/v1/usage/sending-a-basic-response)
- [ Making your response look good ](https://spatie.be/docs/laravel-slack-slash-command/v1/usage/making-your-response-look-good)
- [ Making your attachments interactive ](https://spatie.be/docs/laravel-slack-slash-command/v1/usage/making-your-attachments-interactive)

Advanced usage
--------------

- [ Sending delayed responses ](https://spatie.be/docs/laravel-slack-slash-command/v1/advanced-usage/sending-delayed-responses)
- [ Using signature handlers ](https://spatie.be/docs/laravel-slack-slash-command/v1/advanced-usage/using-signature-handlers)
- [ Responding to multiple commands ](https://spatie.be/docs/laravel-slack-slash-command/v1/advanced-usage/responding-to-multiple-commands)

 Making your response look good
==============================

In various examples giving in these you'll see that `respondToSlack()` is used to send some text back as a response. But you can also add some attachments.

Take a look at this response on Slack:

![](../../images/attachments.png)This is how you would build that up

```
$this->respondToSlack('')
    ->withAttachment(Attachment::create()
        ->setColor('good')
        ->setText('This is good!')
    )
    ->withAttachment(Attachment::create()
        ->setColor('warning')
        ->setText('Warning!')
    )
    ->withAttachment(Attachment::create()
        ->setColor('danger')
        ->setText('DANGER DANGER!')
    )
    ->withAttachment(Attachment::create()
        ->setColor('#439FE0')
        ->setText('This was a hex value')
    );
```

Take a look at [Slacks documentation on attachments](https://api.slack.com/docs/message-attachments) to learn what's possible.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
