title: Laravel testing url to resource in public directory
body: <p>I'm using Laravel Dusk to test all links on a page, these links are PDF files that are that are copied from resources/docs to public/docs with laravel mix.<br />
  The problem is that trying to access the URL of the docs using get(uri) method gives a 404, here is a simplified version of my Dusk:</p>
  <pre><code>protected function refreshApplicationWithLocale($locale)
  {
      self::tearDown();
      putenv(LaravelLocalization::ENV_ROUTE_KEY . '=' . $locale);
      self::setUp();
  }
  
  protected function setUp(): void
  {
      parent::setUp();
      if(!File::copyDirectory( resource_path('docs'), public_path() . '/docs'))
          throw new \Exception(&quot;couldn't copy the folder :(&quot;);
      // Storage::assertExists(public_path() . '/docs/clothing/existing_file.pdf'); // this assertion fails, what's weird is the path in the exception message does actually exist
      $this-&gt;artisan('storage:link');
  }
  
  protected function tearDown(): void
  {
      parent::tearDown();
      foreach (static::$browsers as $browser) {
          $browser-&gt;driver-&gt;manage()-&gt;deleteAllCookies();
      }
  }
  
  public function testClothing()
  {
      $this-&gt;refreshApplicationWithLocale('fr');
      $this-&gt;get('/test')-&gt;assertStatus(200); // passes
      $this-&gt;get('/fr/vetements')-&gt;assertStatus(200); // passes
      //usually I'd get the page urls dynamically with Dusk, but for simplicity sake I'm just testing with this link that I know it exists and can curl it from withing Homestead
      $this-&gt;get('/docs/clothing/Hoodies.pdf')-&gt;assertStatus(200); //failes (404)
  }
  </code></pre>
  <p>What am I missing ?<br />
  Thank you.<br />
  P.S.: I'm using laravel 8 and Homestead</p>
  <p><strong>EDIT:</strong><br />
  After @steven7mwesigwa answer, here is my final code:</p>
  <pre><code>protected function refreshApplicationWithLocale($locale)
  {
      self::tearDown();
      putenv(LaravelLocalization::ENV_ROUTE_KEY . '=' . $locale);
      self::setUp();
  }
  
  protected function setUp(): void
  {
      parent::setUp();
      if(!File::copyDirectory( resource_path('docs'), public_path() . '/docs'))
          throw new \Exception(&quot;couldn't copy the documents folder :(&quot;);
  }
  
  protected function tearDown(): void
  {
      parent::tearDown();
      foreach (static::$browsers as $browser) {
          $browser-&gt;driver-&gt;manage()-&gt;deleteAllCookies();
      }
  }
  
  public function testClothing()
  {
      $this-&gt;refreshApplicationWithLocale('fr');
      $elements = [];
      $this-&gt;browse(function (Browser $browser) use(&amp;$elements){
          $elements = $browser-&gt;visit('myroute')
              -&gt;elements('.tmp_products_list a', 'href');
      });
      $this-&gt;assertGreaterThan(1, count($elements));
      foreach($elements as $element) {
          $response = Http::get($element-&gt;getAttribute('href'));
          self::assertEquals($response-&gt;status(), 200);
      }
  }
  </code></pre>