Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of manually submitting spam/ham #43

Open
BrookeDot opened this issue Nov 6, 2024 · 1 comment
Open

Example of manually submitting spam/ham #43

BrookeDot opened this issue Nov 6, 2024 · 1 comment

Comments

@BrookeDot
Copy link

Apologies if this is off topic but I am new to Laravel, I'm hoping to update the readme with an example of how to manually submit ham/spam.

It is unclear how you get the form data into \Akismet::reportSpam()

I am thinking it is something like:

    ->setCommentAuthorUrl("https://www.google.com")
    ->setCommentContent("It's me, John!")
    ->setCommentType('registration')
...

if( \Akismet::reportSpam() ) {
return true;
}

Any help would be appreciated.

@nickurt
Copy link
Owner

nickurt commented Nov 6, 2024

You are right, with the following functions (https://github.com/nickurt/laravel-akismet?tab=readme-ov-file#set-commentauthor-information)

setUserIp
setUserAgent
setReferrer
setPermalink
setCommentType
setCommentAuthor
setCommentAuthorEmail
setCommentAuthorUrl
setCommentContent
setBlogUrl
setIsTest

Or you can use the mass-assign function

fill

Before calling the reportSpam (https://github.com/nickurt/laravel-akismet?tab=readme-ov-file#submit-spam-missed-spam)

reportSpam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants