bozboz / enquiry
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (v1.1.0) of this package.
v1.1.0
2015-10-16 12:00 UTC
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\EnquiryServiceProvider
to theproviders
array inapp/config/app.php
-
Add
contact_recipient
andcontact_name
toapp/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 thealiases
array inapp/config/app.php
-
Set
from
andname
inapp/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
enquiry
andenquiry-text
files withinapp/views/emails