This is a laravel package to provide a contact form for your laravel site. The form uses bulma css (https://bulma.io/), a captcha (https://github.com/mewebstudio/captcha), markdown to form the email, is language aware and saves each form submition details in the database.
- Install the package via composer.
- Publish, at least, de migration file.
- Run the artisan migration command.
composer require robertgarrigos/contact
The package will register itself automatically.
You can either publish all the package configurations files or just the migration file.
php artisan vendor:publish --provider=Robertgarrigos\\Contact\\ContactServiceProvider
This will publish:
- a config file in
config/contact.php
where you can set the email form address. - some view files in
resources/views/vendor/contact
whith which you can control how to show the contact form and the email sent using markdown. - a lang file
contact.php
inresources/lang
for English an Catalan. - a migration file
create_contacts_table
indatabase/migrations
.
If you want to publish just some of these files you can run php artisan vendor:publish
and choose the corresponding tag for config, lang, views or migration. You might need to tun this command with --force
if you need to overright any existing files.
php artisan vendor:publish --provider=Robertgarrigos\\Contact\\ContactServiceProvider --tag=contact-migration
You must at least publish de migration file before running the artisan migration command
php artisan migrate
Point your browser at yoursite.com/contact
.
Every time a user submits a contact form, you will receive an email to the address set on config/contact.php
. Of course, you need to set the smtp credentials on your .env file.
Also, every submission will add an entry to the database. There is no backend to access that data for now.
Still struggling with the orchestra test bench package. I hope I'll be able to add some tests soon.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
- Add some tests.
- Add a backend to access contact data in the database.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.