【发布时间】:2020-11-03 20:12:24
【问题描述】:
在用户模型中我定义了关系:
\App\User::where('id' ,1)->toSql();
它返回select * from users where id = ? 我怎样才能获得包括参数在内的完整查询?
我还定义了与帖子模型的关系:
public function posts(){
return $this->hasMany(\App\Posts::class);
}
如何查看带参数的完整关系查询?
【问题讨论】: