Download the PHP package falconsw/soft-delete-cleaner without Composer

On this page you can find all versions of the php package falconsw/soft-delete-cleaner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package soft-delete-cleaner

Laravel Soft Delete Cleaner

GitHub release GitHub issues Total Downloads

This package deletes soft deleted rows automatically after a time interval that you define.

Installation

Step 1

Require the package with composer using the following command:

Step 2

The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

Step 3

Now its the time for scheduling the command. in you app/Console/Kernel.php file, paste this code in schedule() function:

In the code above, the command scheduled to run hourly. you can change it. For more information, please read this page.

Step 4 (Optional)

You can publish the config file with this following command:

Also you can set the SOFT_DELETE_CLEANER_EXPIRE_TIME value in .env file. like the following code:

Usage

in your models that used SoftDeletes trait, you can enable Soft Delete Cleaner with this code:

Just write const SOFT_DELETE_CLEANER_STATUS = true in your models! Also you can set expiration time for your deleted entities using the following line:

In the code above, expiration time for your soft deleted entity model is 5 months. The final code is:

You can set any other values for SOFT_DELETE_CLEANER_EXPIRE_TIME like 5(means 5 days), 2 hours, 45 days, 2.5 months, 1 year, etc.

Note: If you don't set any value for SOFT_DELETE_CLEANER_EXPIRE_TIME in your model, the soft deleted models with SOFT_DELETE_CLEANER_STATUS = true will be hard deleted after the time defined in config file named auto-hard-deleter.php.

Soft Delete Cleaner Command

Also you can hard delete expired rows manually using this artisan command:


All versions of soft-delete-cleaner with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
illuminate/console Version ^8|^9
illuminate/database Version ^8|^9
illuminate/support Version ^8|^9
laravel/legacy-factories Version ^1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package falconsw/soft-delete-cleaner contains the following files

Loading the files please wait ....