PHP code example of kim / defender
1. Go to this page and download the library: Download kim/defender 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/ */
kim / defender example snippets
public function rules()
{
$rules = [
// Your rules..
];
// We reject the bait here
foreach (Defender::bait() as $bait) {
$rules[$bait] = 'reject';
}
return $rules;
}