felipedecampos / laravel-soft-archive
This is a package to extends soft delete to use to archive models.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Type:composer-plugin
Requires
- php: ^7.1
- illuminate/console: 5.6.x|5.7.x
- illuminate/database: 5.6.x|5.7.x
- illuminate/events: 5.6.x|5.7.x
- illuminate/filesystem: 5.6.x|5.7.x
- illuminate/support: 5.6.x|5.7.x
Requires (Dev)
- phpunit/phpunit: ^7.0
Suggests
- illuminate/console: Required to use the database commands (5.6.x|5.7.x).
- illuminate/database: Required to use the Illuminate Database package (5.6.x|5.7.x).
- illuminate/events: Required to use the observers with Eloquent (5.6.x|5.7.x).
- illuminate/filesystem: Required to use the migrations (5.6.x|5.7.x).
- illuminate/support: Required to use the Illuminate Support package (5.6.x|5.7.x).
This package is auto-updated.
Last update: 2025-02-21 20:43:54 UTC
README
This is a package to extends soft delete to use to archive models.
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
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
vendor/bin/phpunit
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email felipe.campos.programador@gmail.com instead of using the issue tracker.
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.
Credits
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.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.