PHP code example of bayareawebpro / laravel-trusted-forms

1. Go to this page and download the library: Download bayareawebpro/laravel-trusted-forms 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/ */

    

bayareawebpro / laravel-trusted-forms example snippets


use BayAreaWebPro\TrustedForms\TrustedForms;

$claim = TrustedForms::claimCertificate(request()->only([...]));
$claim->getMaskedCertificateUrl();
$claim->getCertificateToken();
$claim->hasValidCertificate();
$claim->hasValidExpiration();
$claim->hasValidClaims();
$claim->isValid();

$claim->collect('nested.array');
$claim->get('nested.key', 'fallback-values');

use BayAreaWebPro\TrustedForms\TrustedForms;

$certificate = TrustedForms::readCertificate($token);
$certificate->getCertificateUrls();
$certificate->hasValidExpiration();
$certificate->hasValidClaims();
$certificate->isValid();

$certificate->collect('nested.array');
$certificate->get('nested.key', 'fallback-values');
shell script
php artisan vendor:publish --tag=config