title: getting category name from category id in ParkingArea table Laravel vue
body: <p>hi guys in need of assistance , i am a bit confused , i have a categories table and i have a parkingarea table, i want to display the name of the category from the category id when listing the parking areas,</p>
  <p>in my parkingArea model i have</p>
  <pre><code>
      public function category(){
          return $this-&gt;belongsTo(Category::class);
      }
  
  </code></pre>
  <p>also i am fetching from my parkingArea controller like</p>
  <pre><code> public function parkingData()
      {
          return ParkingArea::with(['category'])-&gt;orderBy('id', 'desc')-&gt;get();
      }
  
  </code></pre>
  <p>and in my Area.vue file i have</p>
  <pre><code>loadParkingArea(){
                   axios.get(&quot;api/parkingArea&quot;).then(({ data }) =&gt; (this.parkingArea = data));  
                   console.log(this.data)
                 
              },
  
  </code></pre>
  <p>and i am iterating as</p>
  <pre><code> &lt;tr v-for=&quot;Area in parkingArea.data&quot; :key=&quot;Area.id&quot;&gt;
                                  &lt;td&gt; {{Area.category_id-&gt;name}} &lt;/td&gt;
                                  &lt;td&gt; {{Area.location}}&lt;/td&gt;
                                  &lt;td&gt;{{Area.capacity}}&lt;/td&gt;
                              &lt;/tr&gt;
  </code></pre>
  <p>PLEASE HELP OUT (developia)</p>