title: Correctly redirect to another page with inertia?
body: <p>I&quot;m trying to redirect on click to another page, for some reason it's not working. This is the code on my vue where the redirect buttons are. I've tried two different ways and neither are working.</p>
  <pre><code>&lt;el-row class=&quot;import-btn&quot;&gt;
      &lt;a :href=&quot;'/imports/teachers'&quot;&gt;
          &lt;el-button type=&quot;warning&quot;&gt;
              Importar
          &lt;/el-button&gt;
      &lt;/a&gt;
  &lt;/el-row&gt;
  &lt;el-row class=&quot;import-btn&quot;&gt;
      &lt;el-button type=&quot;warning&quot; @click=&quot;redirectStudents()&quot;&gt;
          Importar
      &lt;/el-button&gt;
  &lt;/el-row&gt;
  </code></pre>
  <pre><code>redirectStudents() {      
    this.$inertia.visit('/imports/students');
  },
  </code></pre>
  <p>I have the web.php routes like this</p>
  <pre><code>Route::resource('imports/students', 'ImportStudentController');
  Route::resource('imports/teachers', 'ImportTeacherController');
  </code></pre>
  <p>In both the controllers I currently just have the index() filled</p>
  <pre><code>public function index()
  {
     return Inertia::render('Import/Students');
  }
  </code></pre>
  <pre><code>public function index()
  {
      return Inertia::render('Import/Teachers');
  }
  </code></pre>
  <p>In the vue files for Teachers and Students I have basic layout and titles for those pages, so they're not empty.</p>
  <p>When I click on the <code>&lt;a :href=&quot;&quot;&gt;</code> button I get redirected to the link but the page is totally blank and when I click on the other button it opens up like a window inside also blank.</p>
  <p>What is the correct way to fix this?</p>