PHPackages                             mykola-yatsenko/laravel-boolean-softdeletes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mykola-yatsenko/laravel-boolean-softdeletes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mykola-yatsenko/laravel-boolean-softdeletes
===========================================

Laravel soft deletes optimization for high load queries

6.0.1(1y ago)092MITPHPPHP &gt;=8.2

Since Jan 23Pushed 1y agoCompare

[ Source](https://github.com/mykola-yatsenko-engineer/laravel-boolean-softdeletes)[ Packagist](https://packagist.org/packages/mykola-yatsenko/laravel-boolean-softdeletes)[ RSS](/packages/mykola-yatsenko-laravel-boolean-softdeletes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (5)Used By (0)

Laravel Boolean SoftDeletes
===========================

[](#laravel-boolean-softdeletes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8ad9ce8701fbcd0899da85668830a705bab150e7934a4d3d8f75cda0579a7ed1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74656e616e74636c6f75642f6c61726176656c2d626f6f6c65616e2d736f667464656c657465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tenantcloud/laravel-boolean-softdeletes)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1965ece734484e8153c34d22b9832f9e8189bfe27138823cea70854cf772209e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74656e616e74636c6f75642f6c61726176656c2d626f6f6c65616e2d736f667464656c657465732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tenantcloud/laravel-boolean-softdeletes)[![Coverage Status](https://camo.githubusercontent.com/c58d05d7374fe2e073248ca84496ea2af69c6551372ba2dcfc94032bbba0770c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f74656e616e74636c6f75642f6c61726176656c2d626f6f6c65616e2d736f667464656c657465732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tenantcloud/laravel-boolean-softdeletes/code-structure)[![Quality Score](https://camo.githubusercontent.com/30e90e941030c088161639a82dc100e70327cfd524fc9bce4368d2f004b31217/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74656e616e74636c6f75642f6c61726176656c2d626f6f6c65616e2d736f667464656c657465732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tenantcloud/laravel-boolean-softdeletes)[![Total Downloads](https://camo.githubusercontent.com/ee72bdb5e9c121d5e895620b2a4753b4dcc28c4baa8b66528750695c87cc53d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74656e616e74636c6f75642f6c61726176656c2d626f6f6c65616e2d736f667464656c657465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tenantcloud/laravel-boolean-softdeletes)

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.

Install
-------

[](#install)

Via Composer

```
$ composer require tenantcloud/laravel-boolean-softdeletes
```

Add `Webkid\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(0)->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 name `is_deleted` to any other by setting static property `IS_DELETED`of certain model

Versions compatibility

```
For Laravel 5 - laravel-boolean-softdeletes 0.1.2
For Laravel 6 - laravel-boolean-softdeletes 1.0.0
For Laravel 7 - laravel-boolean-softdeletes 2.0.0
For Laravel 8 - laravel-boolean-softdeletes 3.*
For Laravel 9 - laravel-boolean-softdeletes 4.*
For Laravel 10 - laravel-boolean-softdeletes 5.*
For Laravel 11 - laravel-boolean-softdeletes 6.*
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on 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.

Credits
-------

[](#credits)

- [Ivan Kolodiy](https://github.com/ivankolodii)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance43

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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

474d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db360365e4e8cda55dd63e667b0559f3b892315a4e03d3e2ba160f149a2955d8?d=identicon)[mykola-yatsenko-engineer](/maintainers/mykola-yatsenko-engineer)

---

Top Contributors

[![ivankolodii](https://avatars.githubusercontent.com/u/35073476?v=4)](https://github.com/ivankolodii "ivankolodii (11 commits)")[![ben221199](https://avatars.githubusercontent.com/u/12856904?v=4)](https://github.com/ben221199 "ben221199 (10 commits)")[![YaroslavNahirnyi](https://avatars.githubusercontent.com/u/40363149?v=4)](https://github.com/YaroslavNahirnyi "YaroslavNahirnyi (10 commits)")[![mykola-yatsenko-engineer](https://avatars.githubusercontent.com/u/196163492?v=4)](https://github.com/mykola-yatsenko-engineer "mykola-yatsenko-engineer (9 commits)")[![oprypkhantc](https://avatars.githubusercontent.com/u/54406427?v=4)](https://github.com/oprypkhantc "oprypkhantc (4 commits)")[![package-sync[bot]](https://avatars.githubusercontent.com/u/35073549?v=4)](https://github.com/package-sync[bot] "package-sync[bot] (3 commits)")[![kolodii-ivan](https://avatars.githubusercontent.com/u/1891846?v=4)](https://github.com/kolodii-ivan "kolodii-ivan (3 commits)")[![m7mdsa3ed](https://avatars.githubusercontent.com/u/22124573?v=4)](https://github.com/m7mdsa3ed "m7mdsa3ed (2 commits)")[![lindyhopchris](https://avatars.githubusercontent.com/u/4464333?v=4)](https://github.com/lindyhopchris "lindyhopchris (2 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mykola-yatsenko-laravel-boolean-softdeletes/health.svg)

```
[![Health](https://phpackages.com/badges/mykola-yatsenko-laravel-boolean-softdeletes/health.svg)](https://phpackages.com/packages/mykola-yatsenko-laravel-boolean-softdeletes)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[spatie/laravel-morph-map-generator

Automatically generate morph maps in your Laravel application

73464.9k1](/packages/spatie-laravel-morph-map-generator)

PHPackages © 2026

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