- Notifications
You must be signed in to change notification settings - Fork16
This package is designed for high-load applications and optimizes queries with soft deletes by utilizing a boolean field for indexing, which is more efficient than using unique timestamps.
License
tenantcloud/laravel-boolean-softdeletes
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This package is designed for high-load applications and optimizes queries with soft deletes by utilizing a boolean field for indexing, which is more efficient than using unique timestamps.
Via Composer
$ composer require tenantcloud/laravel-boolean-softdeletes
AddWebkid\LaravelBooleanSoftdeletes\SoftDeletesBoolean trait to models with soft deletes.
Then create and run migration to add soft delete boolean field
Schema::table('users',function (Blueprint$table) {$table->boolean('is_deleted')->default(false)->index();});
If you want to use this package for existing project you can use built-in command
php artisan softdeletes:migrate
Also you can change default column nameis_deleted to any other by setting static propertyIS_DELETEDof certain model
Versions compatibility
For Laravel 10 - laravel-boolean-softdeletes 5.*For Laravel 11 - laravel-boolean-softdeletes 6.*For Laravel 12 - laravel-boolean-softdeletes 7.*
Please seeCHANGELOG for more information on what has changed recently.
Please seeCONTRIBUTING for details.
If you discover any security related issues, please emailkolodiy.ivan.i@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please seeLicense File for more information.
About
This package is designed for high-load applications and optimizes queries with soft deletes by utilizing a boolean field for indexing, which is more efficient than using unique timestamps.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.