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
).
To install the package, run the following command:
composer require lopzy/contact:dev-main
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
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']);
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.
This package is open-sourced software licensed under the MIT license.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
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.