Skip to content

Commit

Permalink
Laravel 10 + Honeypot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Nov 13, 2023
1 parent f9906a9 commit acfdedb
Show file tree
Hide file tree
Showing 6 changed files with 1,223 additions and 3,230 deletions.
10 changes: 8 additions & 2 deletions app/Http/Controllers/NewsletterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@

use Illuminate\Http\Request;
use ProtoneMedia\Splade\Facades\Toast;
use Spatie\Honeypot\Honeypot;
use Spatie\MailcoachSdk\Facades\Mailcoach;

class NewsletterController
{
public function create()
public function create(Honeypot $honeypot)
{
return view('newsletter', []);
return view('newsletter', [
'honeypot' => [
$honeypot->nameFieldName() => '',
$honeypot->validFromFieldName() => $honeypot->encryptedValidFrom(),
],
]);
}

public function store(Request $request)
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"license": "MIT",
"require": {
"php": "^8.1.0",
"graham-campbell/markdown": "^14.0",
"graham-campbell/markdown": "^15.0",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19",
"laravel/framework": "^10.0",
"laravel/tinker": "^2.7",
"predis/predis": "^2.0",
"protonemedia/laravel-mixins": "^3.3",
Expand All @@ -31,8 +31,8 @@
"laravel/pint": "^1.2",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit acfdedb

Please sign in to comment.