anwar7736 / contact
Send email to the website admin and its store to the database table
dev-main
2023-06-03 15:34 UTC
This package is auto-updated.
Last update: 2024-11-03 19:14:08 UTC
README
This is a contact us package. When any visitor visit your website (Contact us page) and they can send a message to you. This package automatically send a mail to you and it's store to your database table.
Installation
composer require anwar7736/contact
Configuration
- Open config/app.php and add this line to your Service Providers Array.
Anwar\Contact\ContactServiceProvider::class
- Optional configuration file (useful if you plan to have full control)
php artisan vendor:publish --provider="Anwar\Contact\ContactServiceProvider"
- Check your database connection and run this command
php artisan migrate
- Open your .env file and check your mail configuration
MAIL_MAILER=smtp MAIL_HOST=sandbox.smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=username MAIL_PASSWORD=password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=example@gmail.com MAIL_FROM_NAME="${APP_NAME}"
Basic usage
- No need to add this route in your web.php file you can only use this route from your controller or your blade file.
Route::get('/contact', 'index')->name('contact');