lukeraymonddowning / honey

A spam prevention package for Laravel, providing honeypot techniques, ip blocking and beautifully simple Recaptcha integration. Stop spam. Use Honey.
MIT License
406 stars 23 forks source link

laravel 8 with honey route middleware #33

Closed eli007s closed 3 years ago

eli007s commented 3 years ago

I'm following the installation steps with Laravel 8.

added honey as a route middleware

Route::get('/register', \App\Http\Livewire\Client\Register::class)
                ->middleware(['honey'])
                ->name('client.register');

then in my Livewire and also tried in a simple Blade template added <x-honey />

when going to the route that has the middleware and the honey component i get this error;

ErrorException
Undefined array key "honey_time"
http://localhost:8000/contact

in the file: vendor/lukeraymonddowning/honey/src/Checks/MinimumTimePassedCheck.php:14

$value = $data[Honey::inputs()->getTimeOfPageLoadInputName()];

is there something I'm missing?

eli007s commented 3 years ago

nevermind, i saw that I was adding it to my get routes instead of the post routes