PHPackages                             felipedecampos/laravel-soft-archive - 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. [Database &amp; ORM](/categories/database)
4. /
5. felipedecampos/laravel-soft-archive

ActiveComposer-plugin[Database &amp; ORM](/categories/database)

felipedecampos/laravel-soft-archive
===================================

This is a package to extends soft delete to use to archive models.

1.0.0(7y ago)002MITPHPPHP ^7.1

Since Feb 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/felipedecampos/laravel-soft-archive)[ Packagist](https://packagist.org/packages/felipedecampos/laravel-soft-archive)[ Docs](https://github.com/felipedecampos/laravel-soft-archive)[ RSS](/packages/felipedecampos-laravel-soft-archive/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

Laravel - Soft Archive
======================

[](#laravel---soft-archive)

[![PHP from Packagist](https://camo.githubusercontent.com/686b6848edfcf9ac26f991460c45f8a7d13494ad74051d0c464448b7b59d376d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)](https://camo.githubusercontent.com/686b6848edfcf9ac26f991460c45f8a7d13494ad74051d0c464448b7b59d376d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)[![GitHub release](https://camo.githubusercontent.com/84a4caaf20a5991f39dd4a6370b17caf51b5c45e75169cc1b5ae6a618a0f6053/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)](https://camo.githubusercontent.com/84a4caaf20a5991f39dd4a6370b17caf51b5c45e75169cc1b5ae6a618a0f6053/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)[![GitHub](https://camo.githubusercontent.com/99a00ee29309d0da50c2fc64cadae53cccd9b266b5868b54132b65a7b02e48a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)](https://camo.githubusercontent.com/99a00ee29309d0da50c2fc64cadae53cccd9b266b5868b54132b65a7b02e48a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e737667)[![GitHub All Releases](https://camo.githubusercontent.com/3397e37b760edd391181b1b27e8eaf58e2f2c3edbef63ee6f25c1795719b64a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652f746f74616c2e7376673f6c6162656c3d476974687562253230646f776e6c6f616473)](https://camo.githubusercontent.com/3397e37b760edd391181b1b27e8eaf58e2f2c3edbef63ee6f25c1795719b64a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652f746f74616c2e7376673f6c6162656c3d476974687562253230646f776e6c6f616473)[![Packagist](https://camo.githubusercontent.com/85c7ea9f4c2e4eb05723e6cf7ae6aac237567e861ed56fb848847e17945b2627/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e7376673f636f6c6f723d627269676874677265656e266c6162656c3d5061636b6167697374253230646f776e6c6f616473)](https://camo.githubusercontent.com/85c7ea9f4c2e4eb05723e6cf7ae6aac237567e861ed56fb848847e17945b2627/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66656c697065646563616d706f732f6c61726176656c2d736f66742d617263686976652e7376673f636f6c6f723d627269676874677265656e266c6162656c3d5061636b6167697374253230646f776e6c6f616473)

This is a package to extends soft delete to use to archive models.

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

[](#installation)

You can install the package via composer:

```
composer require felipedecampos/laravel-soft-archive
```

Optionally you can publish the configfile with:

```
php artisan vendor:publish --provider="FelipeDeCampos\LaravelSoftArchive\Providers\ArchiveServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Add the soft archive trait to your model, like the example below:

```
class ArchivedModel extends Model
{
    use SoftArchives;
}
```

To archive the entity use the archive() method like the example below:

```
ArchivedModel::withoutArchived()->find($id)->archive();
```

To activate the entity use the unarchive() method like the example below:

```
ArchivedModel::withArchived()->find($id)->unarchive();
```

### Testing

[](#testing)

```
vendor/bin/phpunit
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Postcardware
------------

[](#postcardware)

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Av. Bartholomeu de Carlos, 747 Apto. 32A - Jardim Flor da Montanha, São Paulo / Brazil.

We publish all received postcards [on our company website](http://bettorld.felipedecampos.com.br/opensource/postcards).

Credits
-------

[](#credits)

- [Felipe de Campos](http://site.felipedecampos.com.br/)
- [Tudo pelo conhecimento](http://tudopeloconhecimento.com.br/)

Support us
----------

[](#support-us)

Bettorld is a webdesign agency based in São Paulo, Brazi. You'll find an overview of all our open source projects [on our website](http://bettorld.felipedecampos.com.br/opensource).

Does your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/bettorld). All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

2638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f892b9c651eff5fe4733d9c44ec07c73eb83029b8795dc96b67571eb0609b1fc?d=identicon)[felipedecampos](/maintainers/felipedecampos)

---

Tags

laravelarchivearchivessoft archivearchivedsoft delete extended

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/felipedecampos-laravel-soft-archive/health.svg)

```
[![Health](https://phpackages.com/badges/felipedecampos-laravel-soft-archive/health.svg)](https://phpackages.com/packages/felipedecampos-laravel-soft-archive)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

1.1k651.8k11](/packages/cybercog-laravel-ban)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)

PHPackages © 2026

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