rully
5 months ago
850
9
Laravel

hello guys, how to add whereDay conditions in this code :)

Posted 5 months ago by rully

hello guys, how to add whereDay conditions in this code :)

public function manage($id) {

   $users = DB::table('users')
   ->where('parent_id','=',$id)
        ->join('results',function($join){
           $join->on('users.id','=','results.user_id')
           ->where('result_type','=','closing');
        })
        ->count();
        return $users;
}

Please sign in or create an account to participate in this conversation.