title: How to get around creating a 'List' model in Laravel?
body: <p>Seems like 'List' is a certain keyword for Laravel (or PHP itself, I'm not sure.. I'm new to Laravel).</p>
  
  <p>I have a table in my database called <code>lists</code>. Within that table there's a field called <code>title</code>. Also, a table called <code>tasks</code>, with a <code>list_id</code> column referencing the <code>id</code> column from the <code>lists</code>, so what I'm doing for now is:</p>
  
  <p>app/models/MyAppList.php</p>
  
  <pre><code>class MyAppList extends Eloquent {
      protected $table = 'lists';
      public function tasks() {
          return $this-&gt;hasMany('Task', 'list_id');
      }
  }
  </code></pre>
  
  <p>app/models/Task.php</p>
  
  <pre><code>class Task extends Eloquent {
      public function myapplist()   {
          return $this-&gt;belongsTo('MyAppList');
      }
  }
  </code></pre>
  
  <p>app/routes.php</p>
  
  <pre><code>Route::get('/', function() {
      $v = Task::find(1);
      dd($v-&gt;myapplist()-&gt;lists('title'));
  });
  </code></pre>
  
  <p>This outputs the title of the list that owns that task just fine.</p>
  
  <p>I thought namespacing the model would work. The file would be <code>List.php</code>, the class would be <code>List</code>, inside the file <code>namespace MyApp;</code> and then:</p>
  
  <p>app/routes.php</p>
  
  <pre><code>Route::get('/', function() {
      $lists = MyApp\List::all()-&gt;lists('title');
      dd($lists);
  });
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <h1>EDIT 1:</h1>
  
  <p>To clariy, if I leave the word 'List' as the name of the file and the class and then I try:</p>
  
  <p>app/routes.php</p>
  
  <pre><code>Route::get('/', function() {
      $lists = List::all()-&gt;lists('title');
  
      dd($lists);
  });
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Symfony \ Component \ Debug \ Exception \ FatalErrorException
  syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting '('
  </code></pre>
  
  <p>If I namespace the class <code>List</code>:</p>
  
  <pre><code>Route::get('/', function() {
      $lists = Mdl\List::all()-&gt;lists('title');
  
      dd($lists);
  });
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Symfony \ Component \ Debug \ Exception \ FatalErrorException
  syntax error, unexpected 'List' (T_LIST), expecting identifier (T_STRING)
  </code></pre>