public function insertBean($data)
    {
        $bean = R::xdispense($this->tableName);



        $result =  $this->saveBean($bean, $data);

        if (empty($result->msg)) {
            $result->msg = "The record has been created successfully.";
            $result->class = "callout-info";
            $result->ok = true;
        } else {
            $result->ok = false;
            $result->class = "callout-danger";

        }

        if ($this->afterInsertBean != null) {
            $callable = $this->afterInsertBean;
            $callable($bean, $result);
        }

        return $result;
    }
public function insertBean($data)
    {
        $bean = R::xdispense($this->tableName);



        $result =  $this->saveBean($bean, $data);

        if (empty($result->msg)) {
            $result->msg = "The record has been created successfully.";
            $result->class = "callout-info";
            $result->ok = true;
        } else {
            $result->ok = false;
            $result->class = "callout-danger";

        }

        if ($this->afterInsertBean != null) {
            $callable = $this->afterInsertBean;
            $callable($bean, $result);
        }

        return $result;
    }
public function insertBean ( $ data ) { $ bean = R :: xdispense ( $ this -> tableName ) ; $ result = $ this -> saveBean ( $ bean , $ data ) ; if ( empty ( $ result -> msg ) ) { $ result -> msg = "The record has been created successfully." ; $ result -> class = "callout-info" ; $ result -> ok = true ; } else { $ result -> ok = false ; $ result -> class = "callout-danger" ; } if ( $ this -> afterInsertBean != null ) { $ callable = $ this -> afterInsertBean ; $ callable ( $ bean , $ result ) ; } return $ result ; }
Store Data into Database
@param $data
@return int|string
Store Data into Database