1. Go to this page and download the library: Download tomtruyen/fuzzyness 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/ */
tomtruyen / fuzzyness example snippets
DB::table('users')
->whereFuzzy('name', 'jd', false) // matches John Doe
->first();
User::whereFuzzy('name', 'jd', false) // matches John Doe
->first();
User::whereFuzzy('name', 'jd', false) // matches John Doe
->whereFuzzy('email', 'gm', false) // matches @gmail.com
->first();
DB::table('users')
->whereCustomFuzzy('name', 'jd', [StartOfWordsMatcher::class => 35]) // matches John Doe
->first();
User::whereCustomFuzzy('name', 'jd', [StartOfWordsMatcher::class => 35]) // matches John Doe
->first();