feat: mostly add the contact module. Still needs a lot, but here are the bones.
Background
Starter bones for the contact module.
Re-usable contact form package for Laravel sites.
Action Plan / Actions Taken
-
Form controller -
Ability to store additional fields not defined in the original package -
Event fired on submission -
Listeners for notifications -
Configurable classes -
Configurable notification texts -
Configurable admin notification recipients (by role or email address)
Added tests?
-
Yes, of course -
No, and here's why: Ran over time budget -
I need help writing tests
Requirements
- {{Setup tasks, e.g., migrations, grunt, styles}}
.env
variables
New {{Remove this section if there are no new variables to introduce.}}
See .env.example
for development default values.
Name | Description |
---|---|
CD_CONTACT_FORM_NOTIFICATION_ROLES |
List of roles (comma separated) that will get the admin notification when the form is submitted. |
CD_CONTACT_FORM_NOTIFICATION_EMAILS |
List of raw email addresses (comma separated) that will get the admin notification when the form is submitted. |
High impact changes
- N/A
Deployment notes
Is to be used within a Laravel installation. Can test by importing the repository for a manually checked out path. eg
- mkdir -p ./packages/CustomD
- cd packages/CustomD
- git clone git@git.customd.com:composer/laravel-contact-form.git
- add the path to composer:
"repositories": [
{
"type": "path",
"url": "./packages/CustomD/*"
}
]
- add
"custom-d/cd-contact-form": "dev-develop"
, to yourcomposer.json
require section fin composer install
How to test
-
Code review. -
Review the new/updated tests carefully: are they correct, sufficient, and passing? -
Try and break it!
Task: https://preview.gotasman.com/projects/tasks/contact-package-79936
Edited by Craig Smith