title: What is the best way to use Laravel route in Vue JS component
body: <p>I have a vue js component which makes an axios request to a laravel route. But in the vue files I don't have access to the <code>route()</code> function and have to use static url's for now. 
  Here's some code:
  web.php:</p>
  
  <pre><code>// API
  Route::group(['prefix' =&gt; 'api'], function() {
      // GET
      Route::get('/brands', 'BrandsController@getBrands')-&gt;name('api-get-brands');
      Route::get('/{brand_id}/models', 'BrandsController@getModels')-&gt;name('api-get-models');
      Route::get('/fuel-types', 'BrandsController@getFuelTypes')-&gt;name('api-get-fuel-types');
      Route::get('/gearboxes', 'BrandsController@getGearboxes')-&gt;name('api-get-gearboxes');
  });
  </code></pre>
  
  <p>Vue component:</p>
  
  <pre><code>methods: {
              getBrands: function() {
                  let app = this
                  axios.get('/api/brands')
                      .then(function(response) {
                          app.brands = response.data
                      })
                      .catch(function(error) {
                          console.log(error)
                      })
              },
              ...
  </code></pre>
  
  <p>}</p>
  
  <p>It works now but I wonder if that's the best way or is there some better way to do it</p>