<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>scuration</author_name>
  <author_url>https://blog.hatena.ne.jp/scuration/</author_url>
  <blog_title>Self-Curation</blog_title>
  <blog_url>https://scuration.hateblo.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>投稿型のサイトを作る場合は「ユーザーごとの投稿数を表示したい」「スレッドについたレスを表示したい」といった要件がありますよね。また口コミサイトを作る場合は点数を付けるだけでなく、ユーザーの平均評価を表示したくなるのではないでしょうか。今回は異なるデータベース同士のリレーションと、外部データベースのデータを集計して取得する方法について書きたいと思います。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fscuration.hateblo.jp%2Fentry%2F2020%2F09%2F21%2F190000&quot; title=&quot;Laravel#7 リレーション機能で子テーブルの投稿数を数えたり得点を集計する - Self-Curation&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/scuration/20200802/20200802232227.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-21 19:00:00</published>
  <title>Laravel#7 リレーション機能で子テーブルの投稿数を数えたり得点を集計する</title>
  <type>rich</type>
  <url>https://scuration.hateblo.jp/entry/2020/09/21/190000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
