CakePHP + Vue.js Contact Form
A simple Contact Form made with CakePHP + Vue.js.
Installation
-
Clone the repo locally
git clone git@github.com:ishanvyas22/cakephp-vue-contact-form.git cd cakephp-vue-contact-form
-
Install composer dependencies
composer install
-
Copy
.env.example
to.env
cp config/.env.example config/.env
Uncomment and set
MAIL_TO
,MAIL_FROM
andAPI_ENDPOINT_SALES
environment variables according to your needs. -
Start CakePHP web server or create v-host to run this app.
All set! Navigate to http://localhost:8765/contact (or http://yourdomain.com/contact if you have created virtual host for this) to see contact form.
Features
- On successful submit of the "Customer Support", it will send an email to the email which you've set into
MAIL_TO
environment variable, by default it is set to contact@localhost. The from email will be set toMAIL_FROM
environment variable, by default it is set to noreply@localhost. This will not send an actual email, but it will log the email output into thelogs/email.log
file, to change this behavior you just have to configure transport intoconfig/app.php
file. - On successful submit of the "Sales", it will make an
POST
API request with input data toAPI_ENDPOINT_SALES
url which is set into environment variable.
Built with
Made with