bozboz / enquiry
Installs: 93
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/bozboz/enquiry
Requires
- php: >=5.3.0
 - illuminate/config: 4.2.*
 - illuminate/mail: 4.2.*
 - illuminate/support: 4.2.*
 - illuminate/validation: 4.2.*
 
Requires (Dev)
- mockery/mockery: 0.9.*
 
This package is auto-updated.
Last update: 2021-06-04 10:22:16 UTC
README
Installation
- 
Add
Bozboz\Enquiry\EnquiryServiceProviderto theprovidersarray inapp/config/app.php - 
Add
contact_recipientandcontact_nametoapp/config/app.php - 
Add the following to
app/config/app.php'enquiry_recipient_address' => $_ENV['ENQUIRY_RECIPIENT_ADDRESS'], 'enquiry_recipient_name' => $_ENV['ENQUIRY_RECIPIENT_NAME'], 
Consequently define the environment variables in your .env.dev.php file.
- 
Add
'Enquiry' => 'Bozboz\Enquiry\Facades\Enquiry'to thealiasesarray inapp/config/app.php - 
Set
fromandnameinapp/config/mail.php - 
Setup a route
Route::post('contact', array('as' => 'contact-process', function() { $enquiry = Enquiry::make(Input::get(), array( 'name' => 'required', 'email' => 'required|email', 'message' => 'required|min:20' )); if ($enquiry->fails()) { return Redirect::to(URL::previous() . '#form')->withInput()->withErrors($enquiry->getErrors()); } else { return Redirect::to(URL::previous() . '#form')->with('success', true); } })); - 
Point your contact form to the above route
{{ Form::open(['route' => 'contact-process', 'role' => 'form', 'id' => 'form']) }} - 
Create the
enquiryandenquiry-textfiles withinapp/views/emails