如何解决findWhere() 函数在 Laravel 查询中有什么作用
在函数 findWhere 中使用 findWhere() 做什么.. 在 laravel 中 where 表示条件 这也是条件,但我不知道这到底是什么意思 findWhere do here
提前致谢
public function getInfluencerCampaign($request)
{
return $this->with(["invite" => function($query) use ($request){
$query->with(['campaign' => function($campaignQuery) use($request) {
$campaignQuery->select(['id','name','slug','objective_id'])
->with(['payment' => function($query){
$query->with(['paymentType' => function($paymentQuery){
$paymentQuery->select(['id','name']);
}])->select(['payment_type_id','campaign_id']);
},'objective' => function($objectiveQuery){
$objectiveQuery->select(['id','slug']);
},'statistics' => function($statisticQuery) use ($request){
$statisticQuery->select(['user_id','campaign_id','placement_id','work_rate','rating','eng_rate','comment_count','like_count','follower_count'])
->where('user_id',$request->input('user_id'));
}
]);
}]);
}])
->findWhere([
'assign_to_id' => $request->input('user_id'),])->groupBy('campaign_invite_id');
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。