Skip to content

GetCodeDev/test-levenshtein

Repository files navigation

This is my package test-levenshtein

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require getcodedev/test-levenshtein

You can publish and run the migrations with:

php artisan vendor:publish --tag="test-levenshtein-migrations"
php artisan migrate

Usage

$duplicates = check_duplicates(
    model: User::class,
    search: [
        'first_name' => 'John',
        'home' => [
            'address' => "bbbbb, rrr BB, 77777",
        ],
    ],
    concat_search_columns: [
        'home' => [
            'address' => 'homes.street, homes.city homes.state, homes.zip',
        ],
    ],
    priority_columns: [
        'homes.address',
        'users.first_name',
    ],
    with_similarity_min_common: 50,
    limit: 10
);

Testing

# 1. clone this package && run composer install
composer install

# 2. Then need to set configs for mysql connection in phpunit.xml
cp phpunit.xml.dist phpunit.xml

# 3. Run tests
composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages