PHPackages                             thetemplateblog/trash-bin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thetemplateblog/trash-bin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thetemplateblog/trash-bin
=========================

1.0.0-beta.1(1y ago)029MITPHP

Since Nov 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/thetemplateblog/trash-bin)[ Packagist](https://packagist.org/packages/thetemplateblog/trash-bin)[ RSS](/packages/thetemplateblog-trash-bin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Trash Bin Addon for Statamic
============================

[](#trash-bin-addon-for-statamic)

Overview
--------

[](#overview)

The **Trash Bin** addon for Statamic adds functionality to manage "trashed" content. This addon provides a control panel interface where users can view, restore, or permanently delete soft-deleted items. It extends Statamic with a user-friendly "trash bin" feature for entries and other content types.

### Features:

[](#features)

- View soft-deleted entries and assets.
- Restore deleted items to their original state.
- Permanently delete trashed items.
- Integrated into Statamic’s Control Panel with user permissions.

Installation
------------

[](#installation)

To install the **Trash Bin Addon**, follow these steps:

1. **Install the Addon** via Composer:

    From your project's base directory, run the following command:

    bash

    ```
    composer require thetemplateblog/trash-bin

    ```
2. **Publish the Configuration** (optional):

    If you wish to customize the behavior, publish the config file using:

    bash

    ```
    php artisan vendor:publish --tag=trash-bin-config

    ```

    This will create a configuration file in `config/trash-bin.php` where you can adjust settings such as where trashed items are stored.
3. **Clear Cache**:

    After installation, make sure to clear Statamic’s cache to ensure everything is loaded properly:

    bash

    ```
    php artisan cache:clear
    php please cache:clear

    ```

---

Configuration
-------------

[](#configuration)

You can configure the location of trashed items, permissions, and navigation visibility by editing the published config file:

php

```
// config/trash-bin.php

return [
    'trash_directory' => storage_path('app/trash'),   // Default directory for trashed items
    'show_in_nav' => true,                            // Whether to show the Trash Bin in CP navigation
];

```

---

Permissions
-----------

[](#permissions)

You'll need to configure **permissions** to control access to the Trash Bin:

- **View Trash Bin**: Permission to view the Trash Bin and the list of trashed items (`view trash-bin`).
- **View Trashed Items**: Permission to view and inspect individual trashed items (`view trash-bin-item`).
- **Restore from Trash**: Permission to restore trashed items to their original state (`restore trash-bin-item`).
- **Delete from Trash**: Permission to permanently delete items from the Trash Bin (`delete trash-bin-item`).

You can assign these permissions to specific **User Roles** from the Statamic Control Panel under **Users → Roles**.

---

Usage
-----

[](#usage)

### Viewing Trashed Items

[](#viewing-trashed-items)

Once the addon is installed, you can access the **Trash Bin** from the Statamic Control Panel (CP).

1. **Open Statamic’s Control Panel**.
2. Navigate to **"Trash Bin"** (if shown in the navigation).
3. The Trash Bin displays a list of all soft-deleted items (entries, assets, etc.).

### Restoring Items

[](#restoring-items)

To restore a specific trashed item:

1. **Click "View"** next to the trashed entry you want to inspect.
2. In the detailed view, click **"Restore"** to restore the item to its original state.

### Deleting Items Permanently

[](#deleting-items-permanently)

1. In the list of trashed items, click the **Delete Permanently** button.
2. This action will delete the item permanently from the trash.

### Batch Actions

[](#batch-actions)

You can also perform **batch actions** (like deleting multiple items) using the batch checkbox feature at the top of the list.

---

Routes
------

[](#routes)

By default, the Trash Bin routes are prefixed under `/cp` within the Control Panel (`/cp/trash-bin`).

### Available Routes:

[](#available-routes)

- **View Trash Bin**

    - Route: `/cp/trash-bin`
    - Views the list of trashed items.
- **View a Specific Trashed Item**

    - Route: `/cp/trash-bin/view/{type}/{id}`
    - Views details of a specific trashed item.
- **Restore a Trashed Item**

    - Route: `/cp/trash-bin/{type}/{id}/restore`
    - Restores a soft-deleted item.
- **Permanently Delete a Trashed Item**

    - Route: `/cp/trash-bin/{type}/{id}/permanent`
    - Permanently deletes a soft-deleted item.

---

Support &amp; Contributing
--------------------------

[](#support--contributing)

If you encounter any issues, feel free to report them on the [Issues](https://github.com/the_template_blog/trash-bin/issues) page of this addon’s repository.

To contribute:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Make your changes.
4. Commit your changes (`git commit -am 'Add some feature'`).
5. Push to the branch (`git push origin feature/your-feature`).
6. Open a Pull Request.

---

License
-------

[](#license)

TBD

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance40

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

539d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ab55503b5ed31ac24a1d77451a47ae8b26e916c290fffeeceb67bab85d2f004?d=identicon)[thetemplateblog](/maintainers/thetemplateblog)

---

Top Contributors

[![thetemplateblog](https://avatars.githubusercontent.com/u/1240506?v=4)](https://github.com/thetemplateblog "thetemplateblog (1 commits)")

### Embed Badge

![Health badge](/badges/thetemplateblog-trash-bin/health.svg)

```
[![Health](https://phpackages.com/badges/thetemplateblog-trash-bin/health.svg)](https://phpackages.com/packages/thetemplateblog-trash-bin)
```

###  Alternatives

[statamic/seo-pro

65440.7k](/packages/statamic-seo-pro)[jacksleight/statamic-bard-texstyle

17172.5k](/packages/jacksleight-statamic-bard-texstyle)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)[alt-design/alt-sitemap

Alt Sitemap addon, create a sitemap from Statamic entries

1219.0k](/packages/alt-design-alt-sitemap)[studio1902/statamic-peak-tools

11146.7k](/packages/studio1902-statamic-peak-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
