两个不能同时共存的条件orWhere查询
举例:
//我的所有的积分记录 1,我分享的;2,我点击的;(两个条件不能共存) $activity_log = ActivitySharedLog::where(function ($query) use ($userid) { $query->where('type','shared_get')->where('handle_user_id',$userid); })->orWhere(function ($query) use ($userid) { $query->where('type','shared_click')->where('click_user_id',$userid); })->get();