jtelesforoantonio / laravel-contact-form
laravel 的联系表单
v1.0.0
2019-08-30 20:53 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-09-25 05:37:02 UTC
README
本包是一个为laravel >=5.5设计的简单联系表单,表单使用Bootstrap 4。
安装
使用Composer安装此包。
composer require jtelesforoantonio/laravel-contact-form
Laravel 5.5使用包自动发现,您无需手动添加服务提供者。
使用方法
安装后,您需要运行迁移命令以创建保存消息的表(contact_messages)。
php artisan migrate
如果您想发送联系消息的电子邮件通知,您需要发布配置文件(contact_form)。
php artisan vendor:publish --tag=laravel-contact-form-config
您可以修改使用的HTML表单模板。
php artisan vendor:publish --tag=laravel-contact-form-views
您还可以更改联系表单的翻译。
php artisan vendor:publish --tag=laravel-contact-form-translations
在您想要的位置调用联系路由。
<a href="{{ route('contact') }}">Contact Us</a>