lopzy/contact
Composer 安装命令:
composer require lopzy/contact
包简介
This will send email to admin and save contact query in database
README 文档
README
Lopzy Contact
This package provides functionality for handling "Contact Us" form submissions. It saves the contact query to the database and sends an email to the address specified in the configuration file (config/contact.php).
Installation
To install the package, run the following command:
composer require lopzy/contact:dev-main
Configuration
After installing the package, you need to publish the configuration file. Run the following command:
php artisan vendor:publish --provider="Lopzy\Contact\ContactServiceProvider"
This will create a config/contact.php file where you can specify the email address that will receive contact form submissions.
Next, run the migration to create the necessary database table for storing contact queries:
php artisan migrate
Usage
To use the contact form, include the following routes in your web.php file:
use Lopzy\Contact\Http\Controllers\ContactController; Route::get('contact', [ContactController::class, 'index']); Route::post('contact', [ContactController::class, 'send']);
Sending Data
When submitting the contact form, the following fields should be sent:
name: The name of the senderemail: The email address of the sendermessage: The message from the sender
The data will be saved to the database, and an email will be sent to the address specified in the config/contact.php file.
License
This package is open-sourced software licensed under the MIT license.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
Support
For any issues or questions, please open an issue on GitHub.
This README provides all the necessary information for installing, configuring, and using the package, as well as contributing and finding support.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-19