public function writeHistory($action, $title = null, array $old = [], array $new = [])
    {
        $data['historable_id'] = $this->getKey();
        $data['historable_type'] = get_class($this);
        $data['user_id'] = auth()->id();
        $data['title'] = $title;
        $data['icon_class'] = $this->iconClass($action);
        $data['historable_table'] = $this->getTable();
        $data['action'] = $action;
        $data['old'] = $old;
        $data['new'] = $new;
        (new EloquentHistory())->create($data);
    }
public function writeHistory($action, $title = null, array $old = [], array $new = [])
    {
        $data['historable_id'] = $this->getKey();
        $data['historable_type'] = get_class($this);
        $data['user_id'] = auth()->id();
        $data['title'] = $title;
        $data['icon_class'] = $this->iconClass($action);
        $data['historable_table'] = $this->getTable();
        $data['action'] = $action;
        $data['old'] = $old;
        $data['new'] = $new;
        (new EloquentHistory())->create($data);
    }
public function writeHistory ( $ action , $ title = null , array $ old = [ ] , array $ new = [ ] ) { $ data [ 'historable_id' ] = $ this -> getKey ( ) ; $ data [ 'historable_type' ] = get_class ( $ this ) ; $ data [ 'user_id' ] = auth ( ) -> id ( ) ; $ data [ 'title' ] = $ title ; $ data [ 'icon_class' ] = $ this -> iconClass ( $ action ) ; $ data [ 'historable_table' ] = $ this -> getTable ( ) ; $ data [ 'action' ] = $ action ; $ data [ 'old' ] = $ old ; $ data [ 'new' ] = $ new ; ( new EloquentHistory ( ) ) -> create ( $ data ) ; }
Write History row.

@param string $action
@param string $title
@param string $locale

@return null
Write History row .