src/Repositories/List_EmailRepository.php
public function createNewRecord($data) {
        $list_email = new $this->model;

        $list_email->title      = $data['list_id']." ".$data['email_id'];
        $list_email->list_id    = $data['list_id'];
        $list_email->email_id   = $data['email_id'];
        $list_email->comments   = $data['comments'];
        $list_email->enabled    = $data['enabled'];
        $list_email->created_at = $data['created_at'];
        $list_email->created_by = $data['created_by'];
        $list_email->updated_at = $data['updated_at'];
        $list_email->updated_by = $data['updated_by'];
        $list_email->locked_at  = null;
        $list_email->locked_by  = null;

        if ($list_email->save()) {

            // Return the new ID
            return $list_email->id;
        }

        return false;
    }
public function createNewRecord($data) {
        $list_email = new $this->model;

        $list_email->title      = $data['list_id']." ".$data['email_id'];
        $list_email->list_id    = $data['list_id'];
        $list_email->email_id   = $data['email_id'];
        $list_email->comments   = $data['comments'];
        $list_email->enabled    = $data['enabled'];
        $list_email->created_at = $data['created_at'];
        $list_email->created_by = $data['created_by'];
        $list_email->updated_at = $data['updated_at'];
        $list_email->updated_by = $data['updated_by'];
        $list_email->locked_at  = null;
        $list_email->locked_by  = null;

        if ($list_email->save()) {

            // Return the new ID
            return $list_email->id;
        }

        return false;
    }
public function createNewRecord ( $ data ) { $ list_email = new $ this -> model ; $ list_email -> title = $ data [ 'list_id' ] . " " . $ data [ 'email_id' ] ; $ list_email -> list_id = $ data [ 'list_id' ] ; $ list_email -> email_id = $ data [ 'email_id' ] ; $ list_email -> comments = $ data [ 'comments' ] ; $ list_email -> enabled = $ data [ 'enabled' ] ; $ list_email -> created_at = $ data [ 'created_at' ] ; $ list_email -> created_by = $ data [ 'created_by' ] ; $ list_email -> updated_at = $ data [ 'updated_at' ] ; $ list_email -> updated_by = $ data [ 'updated_by' ] ; $ list_email -> locked_at = null ; $ list_email -> locked_by = null ; if ( $ list_email -> save ( ) ) { // Return the new ID return $ list_email -> id ; } return false ; }
INSERT INTO 'list_email'

@param   array   $data      The data to be saved, which is already validated, washed, & prepped.
@return  mixed              The new list_email.id when save is successful, false when save fails
INSERT INTO list_email