1. Go to this page and download the library: Download silentz/akismet 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/ */
silentz / akismet example snippets
return [
'api_key' => env('AKISMET_API_KEY'),
// these are the form handles you'd like to check for spam
'forms' => [
// the handle of your form
'contact_us' => [
// use `name_field` if you store both first and last name
'name_field' => 'name', // `name` in this case is the field in your form
// use `first_name_field` & `last_name_field` if you store them separately
'first_name_field' => 'first_name',
'last_name_field' => 'last_name',
// field in the form for email and content
'email_field' => 'email',
'content_field' => 'message',
],
'other_form' => [],
],
];