项目作者: nadaft

项目描述 :
Laravel contact us form package to send email and save to database
高级语言: PHP
项目地址: git://github.com/nadaft/contactme.git
创建时间: 2019-02-18T05:55:03Z
项目社区:https://github.com/nadaft/contactme

开源协议:

下载


alt text

ContactMe

Latest Stable Version
Total Downloads
License

A Laravel Package to create Contact Us Form Easily

Features

  • Send Email
  • Save Message to Database

Tested on Laravel 5.7

Installation Steps

1. Require the Package

Run the following command:

  1. composer require nadaft/contactme

2. Add the service provider to your config/app.php providers array:

If you’re installing on Laravel 5.5+ skip this step

  1. Nadaft\ContactMe\ContactMeServiceProvider::class,

3. Run Migration

Run the following command:

  1. php artisan migrate

4. Edit .env File

Add variable MAIL_CONTACTME_TO to .env and then define the email to receive email

For example

  1. MAIL_CONTACTME_TO="hello@example.com"

Finally you can access your contact page by access http://your-site.com/contactme to show the result

Customize Your Form

If you want to create your own contact us page, you must following below instruction :

  • Form action = {{ route('contactme.submit') }}
  • Name field = input name="name"
  • Email field = input name="email"
  • Message field = textarea name="message"

Don’t forget to add {{ csrf_field() }}

You can create the contact page with your own Route and/or Controller

Bugs and Issues

If you found bugs or issues just write to Issues