protected function updateRetryStatus(JobPayload $payload, $retries, $failed)
    {
        return collect($retries)->map(function ($retry) use ($payload, $failed) {
            return $retry['id'] === $payload->id()
                    ? Arr::set($retry, 'status', $failed ? 'failed' : 'completed')
                    : $retry;
        })->all();
    }
protected function updateRetryStatus(JobPayload $payload, $retries, $failed)
    {
        return collect($retries)->map(function ($retry) use ($payload, $failed) {
            return $retry['id'] === $payload->id()
                    ? Arr::set($retry, 'status', $failed ? 'failed' : 'completed')
                    : $retry;
        })->all();
    }
protected function updateRetryStatus ( JobPayload $ payload , $ retries , $ failed ) { return collect ( $ retries ) -> map ( function ( $ retry ) use ( $ payload , $ failed ) { return $ retry [ 'id' ] === $ payload -> id ( ) ? Arr :: set ( $ retry , 'status' , $ failed ? 'failed' : 'completed' ) : $ retry ; } ) -> all ( ) ; }
Update the retry status of a job in a retry array.

@param  \Laravel\Horizon\JobPayload  $payload
@param  array  $retries
@param  bool  $failed
@return array
Update the retry status of a job in a retry array .