Console command to cleanup your database from softdeleted models
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require edofre/laravel-softdelete-cleanup
require section of your
Add the console command to the $commands array in your /app/Console/Kernel.php
protected $commands = [ \Edofre\SoftdeleteCleanup\SoftdeleteCleanup::class, ];
The following command will then remove all the trashed items from the User, note that the User model is not in the default namespace.
php artisan db:softdelete-cleanup App\\Models\\User
Run the tests by executing the following command:
- Set the number of days from which the items should be deleted