PHP code example of medzoner / coinhive-bundle
1. Go to this page and download the library: Download medzoner/coinhive-bundle 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/ */
medzoner / coinhive-bundle example snippets
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Medzoner\Bundle\CoinhiveBundle(),
// ...
);
use CoinhiveBundle\Validator\IsTrue;
//....
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('coinhive-captcha-token', CoinHiveCaptchaType::class, [
'mapped' => false,
'constraints' => [
new IsTrue()
]
])
;
}
//...
bash
php composer.phar