PHP code example of haseebmirza / laravel-compliance-export
1. Go to this page and download the library: Download haseebmirza/laravel-compliance-export 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/ */
haseebmirza / laravel-compliance-export example snippets
use HaseebMirza\ComplianceExport\Contracts\PayloadValidator;
use HaseebMirza\ComplianceExport\Exceptions\InvalidExportPayloadException;
class EmployeeOnlyValidator implements PayloadValidator
{
public function validate(array $payload): void
{
if (($payload['meta']['subject_type'] ?? null) !== 'employee') {
throw new InvalidExportPayloadException('Only employee exports are allowed.');
}
}
}