title: Confirmation alert box with Laravel contact form
body: <p>I am new to Laravel but have managed to get a contact form working and showing validation errors when there are some.</p>
  
  <p>However I do have one problem and have no idea how to handle it in Laravel. When a message is sent (validation rules pass) I would like to display an alert box (Bootstrap style) saying 'Thanks, message has been sent'.</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>public function postContact()
  {
      $formData = Input::all();
  
      // input validator with its rules
      $validator = Validator::make(
          array(
              'name' =&gt; $formData['name'],
              'email' =&gt; $formData['email'],
              'subject' =&gt; $formData['subject'],
              'message' =&gt; $formData['message']
          ),
          array(
              'name' =&gt; 'required|min:3',
              'email' =&gt; 'required|email',
              'subject' =&gt; 'required|min:6',
              'message' =&gt; 'required|min:5'
          )
      );
  
      if ($validator -&gt; passes()) {
          // data is valid
          Mail::send('emails.message', $formData, function($message) use ($formData) {
              $message -&gt; from($formData['email'], $formData['name']);
              $message -&gt; to('info@company.com', 'John Doe') -&gt; subject($formData['subject']);
          });
  
          return View::make('contact');
      } else {
          // data is invalid
          return Redirect::to('/contact') -&gt; withErrors($validator);
      }
  }
  </code></pre>
  
  <p>How can I achieve this in Laravel 4?</p>