Files
snipe-it/app/controllers/ContactUsController.php
T
2013-11-13 01:59:39 -05:00

42 lines
759 B
PHP
Executable File

<?php
class ContactUsController extends BaseController {
/**
* Contact us page.
*
* @return View
*/
public function getIndex()
{
return View::make('frontend/contact-us');
}
/**
* Contact us form processing page.
*
* @return Redirect
*/
public function postIndex()
{
// Declare the rules for the form validation
$rules = array(
'name' => 'required',
'email' => 'required|email',
'description' => 'required',
);
// Create a new validator instance from our validation rules
$validator = Validator::make(Input::all(), $rules);
// If validation fails, we'll exit the operation now.
if ($validator->fails())
{
return Redirect::route('contact-us')->withErrors($validator);
}
# TODO !
}
}