tjventurini / contact
Contact form for my website.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- backpack/crud: ^3.4.0
- guzzlehttp/guzzle: ^6.3
- laravel/framework: 5.5.*
Requires (Dev)
- tjventurini/mini-bootstrap-theme: ^0.0.3
README
This package provides a simple contact form and routes for my website.
Installation
This package is available through packagist. Install it with the following command.
composer require tjventurini/contact
Config
You will need to publish the package configuraton.
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=config
Translations (optional)
The translations are available through tags::tags.key
even though you don't publish them.
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=lang
Views
You will need to publish the package views in order to change them.
php artisan vendor:publish --provider="Tjventurini\Contact\ContactServiceProvider" --tag=views
Configuration
Validation
/*
|--------------------------------------------------------------------------
| Validation
|--------------------------------------------------------------------------
|
| In this section you can change the validation rules for the contact form.
|
*/
'rules' => [
'name' => 'required|string|min:3',
'email' => 'required|email',
'message' => 'required|string',
],
Route Prefix
/*
|--------------------------------------------------------------------------
| Route Prefix
|--------------------------------------------------------------------------
|
| In this section you can define the route prefix of this package.
|
*/
'route_prefix' => 'contact',
Environment
# set mail drive to mailgun
MAIL_DRIVER=mailgun
...
# add mailgun credentials
MAIL_FROM_ADDRESS="john.doe@example.com"
MAIL_FROM_NAME="John Doe"
MAILGUN_DOMAIN="mailgun.example.com"
MAILGUN_SECRET="secret"
# reCaptcha
CAPTCHA_ENABLE=true
CAPTCHA_SITE_KEY="site-key"
CAPTCHA_SECRET="secret"