title: Displaying related table data in vuejs
body: <p>I'm learning vuejs and using laravel for the backend api. I have the following tables</p>
  
  <p>articles, articles_translations and i mentioned their relations in their models</p>
  
  <p>i created a vue component fpr articles</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
        &lt;div v-for="article in articles" :key="article.articles"&gt;
          &lt;h4&gt;{{article.translations}}&lt;/h4&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import axios from 'axios'
  import { mapGetters } from 'vuex'
  
      export default {
          layout: 'basic',
  
          computed: mapGetters({
            locale: 'lang/locale'
          }),
          data: function () {
              return {
                  articles: []
              }
          },
          mounted() {
              var app = this;
              console.log(this.locale);
              axios.get('/api/articles')
                  .then(response =&gt; {
                    // JSON responses are automatically parsed.
                    this.articles = response.data
                  })
                  .catch(e =&gt; {
                    this.errors.push(e)
                  })
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>this displays [ { "id": 1, "article_id": 1, "title": "This is an example title", "subtitle": "this is a subtitle", "content": "this is the content", "locale": "en", "created_at": null, "updated_at": null } ] as expected </p>
  
  <p><a href="https://i.stack.imgur.com/WT6XV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WT6XV.png" alt="enter image description here"></a></p>
  
  <p>I want to display the articles in this format</p>
  
  <ol>
  <li>article title article </li>
  <li>article subtitle </li>
  <li>article content</li>
  </ol>
  
  <p>In blade i normally do {{ $article->article_translations->title }} to fetch related table data. How does this work in vue? How to display the data in the format i mentioned. </p>