---
title: "Attachments — Tickets for Laravel | Roundly"
description: "Files on the ticket itself in a private media-library bucket, served through short-lived signed URLs — plus attachments on replies and notes."
url: https://roundly-consulting.com/open-source/docs/tickets-for-laravel/attachments
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Tickets for Laravel](https://roundly-consulting.com/open-source/docs/tickets-for-laravel.md)

# Attachments

Files on the ticket itself live in a private media-library bucket:

```php
$media = Tickets::for($ticket)->by($agent)->attachments()->add($request->file('log'));
Tickets::for($ticket)->attachments()->remove($media);   // by model or uuid; another owner's is refused
Tickets::for($ticket)->attachments()->all();
```

- The bucket is tickets.attachments.bucket on tickets.attachments.disk (local — never media-library’s web-served public default), with tickets.attachments.mimes and max\_kb.
- Downloads are temporary URLs — the disk’s own, or media-library’s signed stream route. API resources mint them for 5 minutes.
- Add and remove record an activity entry and fire TicketAttachmentAdded / TicketAttachmentRemoved; remove() takes a model or a uuid and refuses another owner’s media.
- Requesters see ticket attachments; for agent-only files use internal-note attachments. In the API, ticket-level uploads and removals are agent-only — requesters attach files to their replies.
- Reply and note attachments are comment attachments and follow comments’ comments.media.\*. tickets:doctor checks that the attachments disk is not public and that download URLs can be minted.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/tickets-for-laravel.md)
