protected function job(&$params)
    {
        $operationName = $this->model->name;
        $instance      = app($this->model->owner_type)->with('job')->find($this->model->owner_id);
        if (is_null($instance)) {
            array_set($params, 'time', '0.0');
            array_set($params, 'name', '[not available]');
            $params['return'] = '<span class="label-basic label-basic--danger ">Error</span>';
            return 'JOBRESULTS_CREATED_ERROR';
        }
        array_set($params, 'return', $instance->return);
        array_set($params, 'time', $instance->runtime);
        array_set($params, 'name', anchor(handles('antares::automation/show/' . $instance->job_id), $instance->job->name));

        if (array_get($this->model->new_value, 'has_error') !== false) {
            $operationName    = 'JOBRESULTS_CREATED_ERROR';
            $params['return'] = '<span id="error-' . $this->model->owner_id . '" class="label-basic label-basic--danger ">error</span><div class="mdl-tooltip" for="error-' . $this->model->owner_id . '">error</div>';
        } else {
            $params['return'] = '<span id="success-' . $this->model->owner_id . '" class="label-basic label-basic--success ">SUCCESSFULLY</span><div class="mdl-tooltip" for="success-' . $this->model->owner_id . '">successfully</div>';
        }
        return $operationName;
    }
protected function job(&$params)
    {
        $operationName = $this->model->name;
        $instance      = app($this->model->owner_type)->with('job')->find($this->model->owner_id);
        if (is_null($instance)) {
            array_set($params, 'time', '0.0');
            array_set($params, 'name', '[not available]');
            $params['return'] = '<span class="label-basic label-basic--danger ">Error</span>';
            return 'JOBRESULTS_CREATED_ERROR';
        }
        array_set($params, 'return', $instance->return);
        array_set($params, 'time', $instance->runtime);
        array_set($params, 'name', anchor(handles('antares::automation/show/' . $instance->job_id), $instance->job->name));

        if (array_get($this->model->new_value, 'has_error') !== false) {
            $operationName    = 'JOBRESULTS_CREATED_ERROR';
            $params['return'] = '<span id="error-' . $this->model->owner_id . '" class="label-basic label-basic--danger ">error</span><div class="mdl-tooltip" for="error-' . $this->model->owner_id . '">error</div>';
        } else {
            $params['return'] = '<span id="success-' . $this->model->owner_id . '" class="label-basic label-basic--success ">SUCCESSFULLY</span><div class="mdl-tooltip" for="success-' . $this->model->owner_id . '">successfully</div>';
        }
        return $operationName;
    }
protected function job ( & $ params ) { $ operationName = $ this -> model -> name ; $ instance = app ( $ this -> model -> owner_type ) -> with ( 'job' ) -> find ( $ this -> model -> owner_id ) ; if ( is_null ( $ instance ) ) { array_set ( $ params , 'time' , '0.0' ) ; array_set ( $ params , 'name' , '[not available]' ) ; $ params [ 'return' ] = '<span class="label-basic label-basic--danger ">Error</span>' ; return 'JOBRESULTS_CREATED_ERROR' ; } array_set ( $ params , 'return' , $ instance -> return ) ; array_set ( $ params , 'time' , $ instance -> runtime ) ; array_set ( $ params , 'name' , anchor ( handles ( 'antares::automation/show/' . $ instance -> job_id ) , $ instance -> job -> name ) ) ; if ( array_get ( $ this -> model -> new_value , 'has_error' ) !== false ) { $ operationName = 'JOBRESULTS_CREATED_ERROR' ; $ params [ 'return' ] = '<span id="error-' . $ this -> model -> owner_id . '" class="label-basic label-basic--danger ">error</span><div class="mdl-tooltip" for="error-' . $ this -> model -> owner_id . '">error</div>' ; } else { $ params [ 'return' ] = '<span id="success-' . $ this -> model -> owner_id . '" class="label-basic label-basic--success ">SUCCESSFULLY</span><div class="mdl-tooltip" for="success-' . $ this -> model -> owner_id . '">successfully</div>' ; } return $ operationName ; }
When logs entity comes from automation job

@param array $params
@return String
When logs entity comes from automation job