public function getCustomWitnesses($filterIsDue = false)
    {
        $list = collect();

        foreach (config('eyewitness.custom_witnesses', []) as $witness) {
            if ($this->isValidWitness($witness)) {
                $instance = app($witness);
                if ($filterIsDue) {
                    if ($instance->isDue()) {
                        $list->push($instance);
                    }
                } else {
                    $list->push($instance);
                }
            }
        }

        return $list;
    }
public function getCustomWitnesses($filterIsDue = false)
    {
        $list = collect();

        foreach (config('eyewitness.custom_witnesses', []) as $witness) {
            if ($this->isValidWitness($witness)) {
                $instance = app($witness);
                if ($filterIsDue) {
                    if ($instance->isDue()) {
                        $list->push($instance);
                    }
                } else {
                    $list->push($instance);
                }
            }
        }

        return $list;
    }
public function getCustomWitnesses ( $ filterIsDue = false ) { $ list = collect ( ) ; foreach ( config ( 'eyewitness.custom_witnesses' , [ ] ) as $ witness ) { if ( $ this -> isValidWitness ( $ witness ) ) { $ instance = app ( $ witness ) ; if ( $ filterIsDue ) { if ( $ instance -> isDue ( ) ) { $ list -> push ( $ instance ) ; } } else { $ list -> push ( $ instance ) ; } } } return $ list ; }
Load all custom witnesses and optionally filter if they are due to run.

@param  bool  $filterIsDue
@return \Illuminate\Support\Collection
Load all custom witnesses and optionally filter if they are due to run .