我有两个多对多的表
$u_id = $request->user_name;
$start_date = $request->get('start_date');
$end_date = $request->get('end_date');
$req = DB::table('reqs')
->join('req_user', 'reqs.req_id', "=", 'req_user.req_id')
->whereBetween('date_applied', [$start_date, $end_date])
->where('user_id', $u_id)
->pluck('req_id');