protected function users()
    {
        $user   = auth()->user();
        $roles  = $childs = $user->roles->first()->getChilds();

        $users = User::select(['id'])->withoutGlobalScopes()->whereHas('roles', function($query) use($roles) {
                    $query->whereIn('tbl_roles.id', array_values($roles));
                })->get()->pluck('id')->toArray();
        array_push($users, $user->id);
        return $users;
    }
protected function users()
    {
        $user   = auth()->user();
        $roles  = $childs = $user->roles->first()->getChilds();

        $users = User::select(['id'])->withoutGlobalScopes()->whereHas('roles', function($query) use($roles) {
                    $query->whereIn('tbl_roles.id', array_values($roles));
                })->get()->pluck('id')->toArray();
        array_push($users, $user->id);
        return $users;
    }
protected function users ( ) { $ user = auth ( ) -> user ( ) ; $ roles = $ childs = $ user -> roles -> first ( ) -> getChilds ( ) ; $ users = User :: select ( [ 'id' ] ) -> withoutGlobalScopes ( ) -> whereHas ( 'roles' , function ( $ query ) use ( $ roles ) { $ query -> whereIn ( 'tbl_roles.id' , array_values ( $ roles ) ) ; } ) -> get ( ) -> pluck ( 'id' ) -> toArray ( ) ; array_push ( $ users , $ user -> id ) ; return $ users ; }
Child users getter

@return array
Child users getter