Download the PHP package johndivam/check-duplicate without Composer
On this page you can find all versions of the php package johndivam/check-duplicate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download johndivam/check-duplicate
More information about johndivam/check-duplicate
Files in johndivam/check-duplicate
Package check-duplicate
Short Description Check for duplicate rows based on specified columns across multiple models
License MIT
Informations about the package check-duplicate
CheckDuplicates Package for Laravel
The CheckDuplicates package is a Laravel package designed to check for duplicate rows in specified models based on configurable columns. It supports both regular and soft-deleted models and logs the results daily for easy review.
Features
- Check for duplicate rows in one or more models.
- Supports multiple columns for duplicate checks.
- Configurable to include soft-deleted rows.
- Daily logging of duplicate checks for easy monitoring.
Installation
You can install the package via Composer:
Configuration
Add the service provider to config/app.php under providers:
After installation, publish the configuration file:
This will create a configuration file at config/check-duplicates.php
.
Configuration Options
Edit the config/check-duplicates.php
file to specify the models and columns you want to check for duplicates:
Usage
The package runs a scheduled command to check for duplicates every minute. You can manually trigger the check with:
You may also schedule this command in your App\Console\Kernel.php
file to run at your desired interval:
Logging
The results of the duplicate checks are logged daily in the storage/logs/
directory. The log file is named as check_duplicates-YYYY-MM-DD.log
, where YYYY-MM-DD
is the date the log was created.
Example Log Entry
Contributing
If you would like to contribute to this package, please fork the repository and submit a pull request.
License
This package is open-sourced software licensed under the MIT license.