title: Laravel 4 - Form data not being submitted into db
body: <p>I'm a bit stumped as to why the form data is not being submitted into the db from the code below. I'm a bit new to Laravel 4, and I surmising I am missing a call somewhere in the code. When I click submit I'm re-routed but the entry isn't added to the database. Help would be appreciated in pointing out what I am missing. Thank you so much.</p>
  
  <p><strong>EntriesController.php</strong></p>
  
  <pre><code>&lt;?php
  
  class EntriesController extends BaseController {
  
  #Handles "GET /" request
  public function getIndex()
  {
      return View::make('home')-&gt;with('entries', Entry::all());
  }   
  
  #Handles "POST /" request
  public function postIndex()
  {
      $entry = array(
          'username' =&gt; Input::get('frmName'),
          'email'    =&gt; Input::get('frmEmail'),
          'comment'  =&gt; Input::get('frmComment')
      );
  
  // save the guestbook entry to the database
  Entry::create($entry);
  
  return Redirect::to('/');
  }
  }
  
  ?&gt;
  </code></pre>
  
  <p><strong>home.blade.php</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Laravel 4 Guestbook&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      @foreach ($entries as $entry)
          &lt;p&gt;{{ $entry-&gt;comment }}&lt;/p&gt;
          &lt;p&gt;Posted on {{ $entry-&gt;created_at-&gt;format('M jS, Y') }} by 
             &lt;a href="mailto:{{ $entry-&gt;email }}"&gt;{{ $entry-&gt;username}}&lt;/a&gt;
          &lt;/p&gt;&lt;hr&gt;
      @endforeach
  
      &lt;form action="/" method="post"&gt;
          &lt;table border="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;Name&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" name="frmName" value="" size="30" maxlength="50"&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Email&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" name="frmEmail" value="" size="30" maxlength="100"&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;Comment&lt;/td&gt;
                  &lt;td&gt;&lt;input textarea name="frmComment" row="5" cols="30"&gt;&lt;/textarea&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="submit" name="submit" value="submit"&gt; 
                      &lt;input type="reset" name="reset" value="reset"&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Entry.php</strong></p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <p>class Entry extends Eloquent {</p>
  
  <pre><code>   /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'entries';
  
  }
  
  ?&gt;
  </code></pre>
  
  <p><strong>routes.php</strong></p>
  
  <pre><code>Route::controller('/', 'EntriesController');
  </code></pre>