PHP code example of custom-d / hashed-search

1. Go to this page and download the library: Download custom-d/hashed-search 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/ */

    

custom-d / hashed-search example snippets




namespace App\Models;

...
use CustomD\EloquentModelEncrypt\ModelEncryption;
use CustomD\HashedSearch\Contracts\HasSearchableHash;

class EncryptedModel extends Model
{
    use ModelEncryption;
    use HasSearchableHash;


    protected $searchableHash = ['encryp_column_1','encypted_column_2'];
...
}

EncryptdModel::searchHashedField('encryp_column_1','clear text here');

\CustomD\HashedSearch\Facades\HashedSearch::create('string to hash');
bash
php artisan vendor:publish --provider="CustomD\HashedSearch\ServiceProvider"