tjventurini / contact
我的网站的联系表单。
此包的规范仓库似乎已消失,因此该包已被冻结。
v0.0.10
2019-05-25 23:30 UTC
Requires
- backpack/crud: ^3.4.0
- guzzlehttp/guzzle: ^6.3
- laravel/framework: 5.5.*
Requires (Dev)
- tjventurini/mini-bootstrap-theme: ^0.0.3
README
此包提供简单的联系表单和路由,用于我的网站。
安装
此包可通过packagist获取。使用以下命令进行安装。
composer require tjventurini/contact
配置
您需要发布包配置。
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=config
翻译(可选)
即使您没有发布它们,翻译也通过tags::tags.key
提供。
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=lang
视图
您需要发布包视图才能更改它们。
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=views
配置
验证
/*
|--------------------------------------------------------------------------
| Validation
|--------------------------------------------------------------------------
|
| In this section you can change the validation rules for the contact form.
|
*/
'rules' => [
'name' => 'required|string|min:3',
'email' => 'required|email',
'message' => 'required|string',
],
路由前缀
/*
|--------------------------------------------------------------------------
| Route Prefix
|--------------------------------------------------------------------------
|
| In this section you can define the route prefix of this package.
|
*/
'route_prefix' => 'contact',
环境
# set mail drive to mailgun
MAIL_DRIVER=mailgun
...
# add mailgun credentials
MAIL_FROM_ADDRESS="john.doe@example.com"
MAIL_FROM_NAME="John Doe"
MAILGUN_DOMAIN="mailgun.example.com"
MAILGUN_SECRET="secret"
# reCaptcha
CAPTCHA_ENABLE=true
CAPTCHA_SITE_KEY="site-key"
CAPTCHA_SECRET="secret"