This package is a simple feedback form that uses google recaptcha to prevent spam. It sends an email to the address set in the .env file. This package helps to generate simple contact-us form with google recaptcha.
Via Composer
composer require magan/feedback
Set up your google recaptcha keys inside your .env file.
GOOGLE_RECAPTCHA_SITE_KEY=YOUR_SITE_KEY
GOOGLE_RECAPTCHA_SECRET_KEY=YOUR_SECRET_KEY
Set up your mailing address.
MAIL_TO_ADDRESS="hello@example.com"
MAIL_FROM_ADDRESS="hello@example.com"
You can publish the config file with:
php artisan vendor:publish --provider="Magan\Feedback\FeedbackServiceProvider" --tag='feedback-config'
You can publish and edit the views with:
php artisan vendor:publish --provider="Magan\Feedback\FeedbackServiceProvider" --tag='feedback-views'
<?php
/*
|--------------------------------------------------------------------------
| Setup your google recaptcha keys
|--------------------------------------------------------------------------
|
| You can set use of google recaptcha by setting use to true.
| Please set MAIL_TO_ADDRESS and MAIL_FROM_ADDRESS inside your .env file.
|
*/
return [
'route' => [
'prefix' => 'feedback',
'middleware' => ['web'],
],
'recapthca' => [
'site_key' => env('GOOGLE_RECAPTCHA_SITE_KEY', null),
'secret_key' => env('GOOGLE_RECAPTCHA_SECRET_KEY', null),
'use' => false,
],
'mail' => [
'to' => [
'address' => env('MAIL_TO_ADDRESS', 'hello@gmail.com'),
],
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@gmail.com'),
],
],
];
You can change route of your feedback page by changing the configuration key route.
http://120.0.0.1/feedback
Please see the changelog for more information on what has changed recently.
composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author@email.com instead of using the issue tracker.
MIT. Please see the license file for more information.