承接 thtg88/laravel-exists-without-soft-deleted-rule 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

最新稳定版本:v0.3.0

Composer 安装命令:

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

包简介

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

README 文档

README

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

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

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:

'name' => 'exists_without_soft_deleted:users',

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 security@marco-marassi.com. All security vulnerabilities will be promptly addressed.

统计信息

  • 总下载量: 16.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-19