PHP code example of hashcrypttech / hashguardian
1. Go to this page and download the library: Download hashcrypttech/hashguardian 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/ */
hashcrypttech / hashguardian example snippets
use Hashcrypttech\HashGuardian\Facades\HashGuardian;
HashGuardian::auth(function ($request) {
return in_array($request->user()?->email, [
'[email protected] ',
]);
});
use Hashcrypttech\HashGuardian\Facades\HashGuardian;
// Count events
HashGuardian::count('orders.placed');
// Record numeric metrics
HashGuardian::metric('payment.amount', 99.99);
// Time operations
HashGuardian::startTimer('api.call');
// ... your code ...
HashGuardian::stopTimer('api.call');
use Illuminate\Support\Facades\Schedule;
Schedule::command('hashguardian:prune')->daily();
Schedule::command('hashguardian:aggregate')->hourly();
bash
php artisan hashguardian:install
bash
php artisan hashguardian:token create "My Token"
bash
php artisan hashguardian:monitor
bash
php artisan hashguardian:publish
bash
php artisan vendor:publish --tag=hashguardian-config
php artisan vendor:publish --tag=hashguardian-assets
php artisan vendor:publish --tag=hashguardian-provider