title: Laravel application will not route properly
body: <p>I am trying to create a first application using TCPDF and Laravel 8. I have an initial page which has a listing of users from a MySQL table and two buttons (Download PDF and View PDF)</p>
  <p>There are three routes setup in my web.php file:</p>
  <pre><code>Route::get('/', 'App\Http\Controllers\UserController@index');
  Route::get('download', 'App\Http\Controllers\PDFTestController@savePDF')-&gt;name('download');
  Route::get('viewpdf', 'App\Http\Controllers\PDFTestController@openPDF')-&gt;name('viewpdf');
  </code></pre>
  <p>I have tried creating the buttons and their actions several different ways but the result is always the same:</p>
  <pre><code>// The download button
  &lt;button type=&quot;button&quot; onclick=&quot;window.location='{{ route(&quot;download&quot;)}}'&quot; class=&quot;btn btn-success btn-sm&quot;&gt;Download PDF&lt;/button&gt;
  
  // The view button
  &lt;a href=&quot;viewpdf&quot; class=&quot;btn btn-primary btn-sm&quot;&gt;Open PDF&lt;/a&gt;
  </code></pre>
  <p>The route for the home page correctly calls App\Http\Controllers\UserController@index and the expected page is displayed.</p>
  <p>However, when I try the download page all I get is a 404 &quot;The requested URL was not found on this server.&quot; and the URL it is trying is .../LaravelPDF/public/download</p>
  <p>Clicking the View button results in a 404 as well and the URL is /LaravelPDF/public/viewpdf</p>
  <p>I put some DD() calls in the various functions and it does not appear that they are ever being called.  Instead Laravel is trying to open a view named download or viewpdf.</p>
  <p>I even tried creating a download.blade.php file but that does not open either.</p>
  <p>What am I doing wrong?  Thank you in advance for your help.</p>