public function log($model, $row, $user_id, $action = 'created')
    {
        $history = new History;

        $history->hash = $this->makeUniqueHash($this->config->table, 'hash');
        $history->table = $model;
        $history->row = $row;
        $history->user_id = $user_id;
        $history->crud_action = $action;

        $history->save();
    }
public function log($model, $row, $user_id, $action = 'created')
    {
        $history = new History;

        $history->hash = $this->makeUniqueHash($this->config->table, 'hash');
        $history->table = $model;
        $history->row = $row;
        $history->user_id = $user_id;
        $history->crud_action = $action;

        $history->save();
    }
public function log ( $ model , $ row , $ user_id , $ action = 'created' ) { $ history = new History ; $ history -> hash = $ this -> makeUniqueHash ( $ this -> config -> table , 'hash' ) ; $ history -> table = $ model ; $ history -> row = $ row ; $ history -> user_id = $ user_id ; $ history -> crud_action = $ action ; $ history -> save ( ) ; }
Log an action to the database

@param $model
@param $row
@param $user_id
@param string $action
Log an action to the database