magan/feedback
最新稳定版本:1.0.1
Composer 安装命令:
composer require magan/feedback
包简介
This package helps to create quick contact-us form and send email to the admin.
关键字:
README 文档
README
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.
Installation
Via Composer
composer require magan/feedback
Usage
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'
Publish config file content
<?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'), ], ], ];
Route:
You can change route of your feedback page by changing the configuration key route.
http://120.0.0.1/feedback
Change log
Please see the changelog for more information on what has changed recently.
Testing
composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author@email.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-05