1. Go to this page and download the library: Download algoyounes/idempotency 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/ */
use AlgoYounes\Idempotency\Contracts\Resolver;
class CustomUserIdResolver implements Resolver
{
public function resolve(): string
{
// Your custom logic here
}
}
// In the configuration file
'user_id_resolver' => CustomUserIdResolver::class,