Download the PHP package thtg88/laravel-exists-without-soft-deleted-rule without Composer
On this page you can find all versions of the php package thtg88/laravel-exists-without-soft-deleted-rule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thtg88/laravel-exists-without-soft-deleted-rule
More information about thtg88/laravel-exists-without-soft-deleted-rule
Files in thtg88/laravel-exists-without-soft-deleted-rule
Package laravel-exists-without-soft-deleted-rule
Short Description Provide a Laravel `exists` validation rule that excludes soft-deleted models.
License MIT
Informations about the package laravel-exists-without-soft-deleted-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
- Installation
- Usage
- Validation Rule
- License
- Security Vulnerabilities
Installation
You can publish the configuration file and views by running:
Usage
Laravel Exists Without Soft Deleted Validation Rule exposes a validation rule to check existence of a model, without soft-deleted ones.
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:
For other example of usage, it's equivalent to Laravel's exists
rule.
See the official Laravel documentation for more information
License
Laravel Exists Without Soft Deleted Validation Rule is open-sourced software licensed under the MIT license.
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 [email protected]. All security vulnerabilities will be promptly addressed.
All versions of laravel-exists-without-soft-deleted-rule with dependencies
illuminate/contracts Version ^7.0.0 || ^8.0.0
illuminate/support Version ^7.0.0 || ^8.0.0
illuminate/validation Version ^7.0.0 || ^8.0.0