title: Laravel model plural table name not working
body: <p>PHP version: 5.6.33</p>
  
  <p>Laravel version: 5.2.45</p>
  
  <p>I am following the "quickstart" tutorial on the Laravel website <a href="https://laravel.com/docs/5.2/quickstart" rel="nofollow noreferrer">https://laravel.com/docs/5.2/quickstart</a>.</p>
  
  <p>I'm in the section "Creating The Task" <a href="https://laravel.com/docs/5.2/quickstart#creating-the-task" rel="nofollow noreferrer">https://laravel.com/docs/5.2/quickstart#creating-the-task</a></p>
  
  <p>My code looks just like the one on the website:</p>
  
  <pre><code>// add new task
  Route::post('/task', function(Request $request) {
      $validator = Validator::make($request-&gt;all(), [
          'name' =&gt; 'required|max:255',
      ]);
  
      if ($validator-&gt;fails()) {
          return redirect('/')
              -&gt;withInput()
              -&gt;withErrors($validator);
      }
  
      $task = new Task;
      $task-&gt;name = $request-&gt;name;
      $task-&gt;save();
  
      return redirect('/');
  });
  </code></pre>
  
  <p>Model looks just like the finished version as well <a href="https://github.com/laravel/quickstart-basic/blob/master/app/Task.php" rel="nofollow noreferrer">https://github.com/laravel/quickstart-basic/blob/master/app/Task.php</a>:</p>
  
  <pre><code>namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Task extends Model
  {
      //
  }
  </code></pre>
  
  <p>So when I attempt to add a task I get the following error:</p>
  
  <p><code>FatalErrorException in Inflector.php line 265:
  syntax error, unexpected ':', expecting ';' or '{'</code></p>
  
  <p>When I update the model to the following it works:</p>
  
  <pre><code>namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Task extends Model
  {
      protected $table = 'tasks';
      //
  }
  </code></pre>
  
  <p>But according to documentation I should not have to.</p>
  
  <blockquote>
    <p>Eloquent will assume the Flight model stores records in the flights
    table.</p>
  </blockquote>
  
  <p><a href="https://laravel.com/docs/5.6/eloquent#eloquent-model-conventions" rel="nofollow noreferrer">https://laravel.com/docs/5.6/eloquent#eloquent-model-conventions</a></p>
  
  <p>Why do I have to specifically name the table in the model to make this work? </p>