PHPackages                             thtg88/laravel-exists-without-soft-deleted-rule - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. thtg88/laravel-exists-without-soft-deleted-rule

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

thtg88/laravel-exists-without-soft-deleted-rule
===============================================

Provide a Laravel `exists` validation rule that excludes soft-deleted models.

v0.3.0(5y ago)018.1k↑60.4%1MITPHPCI failing

Since May 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thtg88/laravel-exists-without-soft-deleted-rule)[ Packagist](https://packagist.org/packages/thtg88/laravel-exists-without-soft-deleted-rule)[ RSS](/packages/thtg88-laravel-exists-without-soft-deleted-rule/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (10)Versions (5)Used By (1)

Laravel Exists Without Soft Deleted Validation Rule
===================================================

[](#laravel-exists-without-soft-deleted-validation-rule)

Most of my applications use models with the `SoftDeletes` trait.

Therefore on all my validation rules I always have to specify the `whereNull` additional statement to an `exists` validation rule.

This package provide a shortcut `exists_without_soft_deleted` rule for it.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Validation Rule](#validation-rule)
- [License](#license)
- [Security Vulnerabilities](#security-vulnerabilities)

Installation
------------

[](#installation)

```
composer require thtg88/laravel-exists-without-soft-deleted-rule
```

You can publish the configuration file and views by running:

```
php artisan vendor:publish --provider="Thtg88\ExistsWithoutSoftDeletedRule\ExistsWithoutSoftDeletedRuleServiceProvider"
```

Usage
-----

[](#usage)

Laravel Exists Without Soft Deleted Validation Rule exposes a validation rule to check existence of a model, without soft-deleted ones.

### Validation Rule

[](#validation-rule)

The validation rule is available using `exists_without_soft_deleted`.

If you are validating the `name` attribute on the `users` table for example, you can use the rule as:

```
'name' => 'exists_without_soft_deleted:users',

```

For other example of usage, it's equivalent to Laravel's `exists` rule.

See the [official Laravel documentation](https://laravel.com/docs/7.x/validation#rule-exists) for more information

License
-------

[](#license)

Laravel Exists Without Soft Deleted Validation Rule is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Laravel Exists Without Soft Deleted Validation Rule, please send an e-mail to Marco Marassi at . All security vulnerabilities will be promptly addressed.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~80 days

Total

4

Last Release

1995d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16927402?v=4)[Marco Marassi](/maintainers/thtg88)[@thtg88](https://github.com/thtg88)

---

Top Contributors

[![thtg88](https://avatars.githubusercontent.com/u/16927402?v=4)](https://github.com/thtg88 "thtg88 (29 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thtg88-laravel-exists-without-soft-deleted-rule/health.svg)

```
[![Health](https://phpackages.com/badges/thtg88-laravel-exists-without-soft-deleted-rule/health.svg)](https://phpackages.com/packages/thtg88-laravel-exists-without-soft-deleted-rule)
```

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.7k](/packages/illuminate-database)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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