Download the PHP package waad/laravel-duplicated-unique-soft-delete without Composer
On this page you can find all versions of the php package waad/laravel-duplicated-unique-soft-delete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waad/laravel-duplicated-unique-soft-delete
More information about waad/laravel-duplicated-unique-soft-delete
Files in waad/laravel-duplicated-unique-soft-delete
Package laravel-duplicated-unique-soft-delete
Short Description Add media to your Laravel application in one place
License MIT
Homepage https://github.com/waadmawlood/laravel-duplicated-unique-soft-delete
Informations about the package laravel-duplicated-unique-soft-delete
📌 Duplicated Unique Soft Delete Package
Deleting unique columns using soft delete is not a recommended method but works in some cases where the data is not important.
🧔 Authors
🎈 Mini Requirement
- PHP >= 8.0.0
💯 Installation
Installation By Composer
🧰 Usage
In Model
-
We have to parameters to help your choice in request
1 - unique_or_operator
It does not check all unique columns, it must be variable, but it takes the least consideration, which is at least one variable column, to delete the old one and enter the new one.
values = 1
or true
2 - unique_select_attributes
It does not check all unique columns specified in Moodel but only those specified here in this parameter.
eg. values = serial_number,mac_address
⚠️ Note must remove unique validation from request form of controller
eg.
Instead Of
🎀 Example
- POST method created example
use parameters
⚠️ when use unique_or_operator
here will check only serial_number
and use or
in checking regardless mac_address
if exist with serial_number
in same record