---
tags: [attachments, routes]
module: Attachments
---

# Routes

## Connections
[[_Attachments]] · [[[Controller]GeneralAttachmentController]]

## Source
```
Modules/Attachments/Routes/web.php
Modules/Attachments/Routes/api.php
```

## Both Web & API (same 7 endpoints, different middleware)

| Method | URI | Controller | Permission |
|---|---|---|---|
| GET | /general-attachments | GeneralAttachmentController@index | general-attachments.view |
| GET | /general-attachments/create | GeneralAttachmentController@create | general-attachments.create |
| POST | /general-attachments | GeneralAttachmentController@store | general-attachments.create |
| GET | /general-attachments/{attachment} | GeneralAttachmentController@show | general-attachments.view |
| GET | /general-attachments/{attachment}/edit | GeneralAttachmentController@edit | general-attachments.edit |
| PUT | /general-attachments/{attachment} | GeneralAttachmentController@update | general-attachments.edit |
| DELETE | /general-attachments/{attachment} | GeneralAttachmentController@destroy | general-attachments.delete |

## Middleware
**Web**: `web`, `LaravelLocalization`, `company.auth`, `restrict-e-invoicing-package-features`
**API**: `auth:sanctum`, `restrict-e-invoicing-package-features`

## Prefix
**Web**: `/{locale}/attachments/general-attachments`
**API**: `/api/attachments/general-attachments`
