title: Why is my route in Laravel returning a 404 error?
body: <p>So in my routes.php file I have this:</p>
  
  <pre><code>Route::get('contact', function() {
     return view('contact');
  });
  </code></pre>
  
  <p>When I go to domain.com/contact I get a return error. However when I put:</p>
  
  <pre><code>Route::get('/', function() {
      return view('contact');
  });
  </code></pre>
  
  <p>and go to domain.com the page appears. Any idea what could be causing this?</p>
  
  <p>Full Routes file:</p>
  
  <pre><code>&lt;?php
  
  /*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register all of the routes for an application.
  | It's a breeze. Simply tell Laravel the URIs it should respond to
  | and give it the controller to call when that URI is requested.
  |
  */
  
  Route::get('/', function () {
      return view('homeIndex');
  });
  
  Route::get('contact', function() {
      return view('contact');
  });
  </code></pre>
  
  <p>php artisan route:list returns:</p>
  
  <pre><code>+--------+----------+---------+------+---------+------------+
  | Domain | Method   | URI     | Name | Action  | Middleware |
  +--------+----------+---------+------+---------+------------+
  |        | GET|HEAD | /       |      | Closure | web        |
  |        | GET|HEAD | contact |      | Closure | web        |
  +--------+----------+---------+------+---------+------------+
  </code></pre>