title: React Router in Laravel Blade 404 Not Found Error for deeper url Levels
body: <p>I am incorporating React in an <strong>existing</strong> Laravel app.</p>
  
  <ul>
  <li>I created a separate view (documents.blade.php), inside which my root React component is rendered.</li>
  <li>In my web.php I created a route that points to this documents view.</li>
  <li>Inside my React component I am using React Router.</li>
  </ul>
  
  <p>Although the url for document.blade is working, and my react component is rendering inside it, when I am trying to create sub links with React Router
  I am getting a 404 Error, Not Found.</p>
  
  <p>Any ideas on why React Rooter doesn't work?</p>
  
  <p>In my web.php I have tried all the ways bellow:</p>
  
  <pre><code>Route::get('{locale}/documents', function() {
          return view('documents');
      });
  
  Route::get('{locale}/documents', function() {
          return view('documents');
      })-&gt;where('{locale}/documents', '.*');
  
  Route::view('{locale}/{path?}', 'documents');
  </code></pre>
  
  <p>In my app.js I have tried:</p>
  
  <pre><code>return (
  
      &lt;Switch&gt;
          &lt;Route exact path="/" component={Index} /&gt;
          &lt;Route path="/create" component={AddDocument} /&gt;
          &lt;Route path="/edit" component={EditDocument} /&gt;
          &lt;Route path="/details" component={DocumentDetails} /&gt;
      &lt;/Switch&gt;
  );
  </code></pre>
  
  <p>or</p>
  
  <pre><code>return (
      &lt;Switch&gt;
          &lt;Route exact path="/" component={Index} /&gt;
          &lt;Route path={props.locale + "document/create"} component={AddDocument} /&gt;
          &lt;Route path={props.locale + "document/edit/:id"} component={EditDocument} /&gt;
          &lt;Route path={props.locale + "document/details/:id"} component={DocumentDetails} /&gt;
      &lt;/Switch&gt;
  );
  </code></pre>
  
  <p>I am accessing the top level url: 
  <a href="http://localhost:8090/public/en/documents" rel="nofollow noreferrer">http://localhost:8090/public/en/documents</a> (Renders my app component)
  ,but anything below that is not working like this one:
  <a href="http://localhost:8090/public/en/documents/create" rel="nofollow noreferrer">http://localhost:8090/public/en/documents/create</a> (Does not display my Create component or anything else. I get the 404 error )</p>
  
  <p>Has anyone worked on anything similar?
  Thank you in advance.</p>