snowlyg 5年前

修改理由:

前面翻译好像不好理解,可能我的理解水平不太行

相关信息:


此投稿已在 5年前 合并。

内容修改:

红色背景 为原始内容

绿色背景 为新增或者修改的内容

OldNewDifferences
938938
939939   use Illuminate\Database\Eloquent\Builder;
940940
941    // 查询与帖子或视频相关的评论,标题为 foo%...
 941   // 查询与帖子或视频相关并且标题包含 foo 的评论...
942942   $comments = App\Comment::whereHasMorph(
943943       'commentable',
944944       ['App\Post', 'App\Video'],
 
11911191       $query->orderBy('published_date', 'asc');
11921192   }]);
11931193
1194 如果希望关联关系仅在尚未加载时才去加载,以避免无效重复加载,你可以使用 `loadMissing` 方法:
 1194如果希望加载还没有加载的关联关系时,你可以使用 `loadMissing` 方法:
11951195
11961196   public function format(Book $book)
11971197   {
 
12181218   class ActivityFeed extends Model
12191219   {
12201220       /**
1221         * Get the parent of the activity feed record.
 1221        * 获取 activity feed 记录的父级。
12221222        */
12231223       public function parentable()
12241224       {