PHP code example of johndivam / check-duplicate

1. Go to this page and download the library: Download johndivam/check-duplicate library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

johndivam / check-duplicate example snippets


return [
    'models' => [
        [
            'model' => \App\Models\Task::class,
            'columns' => ['project_id', 'name'],
            'with_deletes' => false, // Set to false to exclude soft-deleted records
        ],
        [
            'model' => \App\Models\Order::class,
            'columns' => ['cart_id'],
            'with_deletes' => true, // Set to true to 

protected function schedule(Schedule $schedule)
{
    $schedule->command('duplicates:check')->everyMinute();
}
bash
php artisan vendor:publish --provider="Johndivam\CheckDuplicate\CheckDuplicatesServiceProvider"
bash
php artisan duplicates:check