title: How to use Laravel authentication and vue-router together
body: <p>I'm new to Laravel and PHP in general, but familiar with Vue and SPA's. I know how to create authentication with Bcrypt, for example. However, I used Laravel to run <code>php artisan make:auth</code> and to create several different endpoints for the backend. </p>
  
  <p>I was trying to convert my app into a SPA using Vue, however using routing with Vue causes issues with the routes defined in the web.php. For example, I have my web.php like this, with several different routes.</p>
  
  <pre><code>&lt;?php
  
  Route::get('/{vue_capture?}', function () {
      return view('app');
   })-&gt;where('vue_capture', '^(?!storage).*$'); 
  
  Route::get('/', function () {
      return view('app');
  });
  Route::resource('Videos', 'VideoController')-&gt;middleware('auth','isAdmin');
  Route::resource('Categories', 'CategoriesController')-&gt;middleware('auth');
  Route::get('/search', 'VideoController@search')-&gt;middleware('auth');
  
  Auth::routes();
  
  Route::get('/settings/account', 'AccountsController@edit')-&gt;middleware('auth');
  Route::get('/auth', 'AccountsController@get');
  Route::put('/settings/account', 'AccountsController@update')-&gt;middleware('auth');
  </code></pre>
  
  <p>However, I also have a routes.js to have vue-router handle the routing with the following :</p>
  
  <pre><code>import Home from './components/Home.vue'
  import Videos from './components/Videos.vue'
  import Categories from './components/Categories.vue'
  
  export default{
      mode: 'history',
  
  
      routes: [
          {
              path:'/',
              component:Home
          },
  
          {
              path:'/Videos',
              component:Videos
          },
          {
              path:'/Categories',
              component:Categories
          },
          {
              path:'/login',
              component:login
          },
          {
              path:'/register',
              component:register
          },
          {
              path:'/logout',
              component:logout
          }
      ]
  }
  </code></pre>
  
  <p>I understand that Vue is supposed to take over the routing if you use a SPA, but is there any way to use both? I can't find anything that addresses this issue but I can't believe that Laravel would make you choose to either use their built-in commands like <code>php artisan make:auth</code> or have to scrap all of that and do it all manually if you want a SPA with routing.</p>
  
  <p>I've tried going through different CRUD turorials on using Laravel and or Vue.
  I've tried directing all of the routes to Vue to have vue-router handle the routing.
  I've tried not giving all routing to vue-router and retaining the back-end routes that I had in web.php</p>
  
  <p>Other semi-related problem is my routes aren't even appearning as links using <code>router-link</code> . It just appears as normal text. But for now my priority is the routing issue.</p>