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

        $people['user_id']        = $data['user_id'];
        $people['title']          = $data['title'];
        $people['salutation']     = $data['salutation'];
        $people['first_name']     = $data['first_name'];
        $people['middle_name']    = $data['middle_name'];
        $people['surname']        = $data['surname'];
        $people['position']       = $data['position'];
        $people['description']    = $data['description'];
        $people['comments']       = $data['comments'];

        $people['birthday']       = $data['birthday'];
        $people['anniversary']    = $data['anniversary'];

        $people['created_at']     = $data['created_at'];
        $people['created_by']     = $data['created_by'];
        $people['updated_at']     = $data['updated_at'];
        $people['updated_by']     = $data['updated_by'];

        $people['profile']        = $data['profile'];
        $people['featured_image'] = $data['featured_image'];

        if ($people->save()) {

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

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

        $people['user_id']        = $data['user_id'];
        $people['title']          = $data['title'];
        $people['salutation']     = $data['salutation'];
        $people['first_name']     = $data['first_name'];
        $people['middle_name']    = $data['middle_name'];
        $people['surname']        = $data['surname'];
        $people['position']       = $data['position'];
        $people['description']    = $data['description'];
        $people['comments']       = $data['comments'];

        $people['birthday']       = $data['birthday'];
        $people['anniversary']    = $data['anniversary'];

        $people['created_at']     = $data['created_at'];
        $people['created_by']     = $data['created_by'];
        $people['updated_at']     = $data['updated_at'];
        $people['updated_by']     = $data['updated_by'];

        $people['profile']        = $data['profile'];
        $people['featured_image'] = $data['featured_image'];

        if ($people->save()) {

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

        return false;
    }
public function createNewRecord ( $ data ) { $ people = new $ this -> model ; $ people [ 'user_id' ] = $ data [ 'user_id' ] ; $ people [ 'title' ] = $ data [ 'title' ] ; $ people [ 'salutation' ] = $ data [ 'salutation' ] ; $ people [ 'first_name' ] = $ data [ 'first_name' ] ; $ people [ 'middle_name' ] = $ data [ 'middle_name' ] ; $ people [ 'surname' ] = $ data [ 'surname' ] ; $ people [ 'position' ] = $ data [ 'position' ] ; $ people [ 'description' ] = $ data [ 'description' ] ; $ people [ 'comments' ] = $ data [ 'comments' ] ; $ people [ 'birthday' ] = $ data [ 'birthday' ] ; $ people [ 'anniversary' ] = $ data [ 'anniversary' ] ; $ people [ 'created_at' ] = $ data [ 'created_at' ] ; $ people [ 'created_by' ] = $ data [ 'created_by' ] ; $ people [ 'updated_at' ] = $ data [ 'updated_at' ] ; $ people [ 'updated_by' ] = $ data [ 'updated_by' ] ; $ people [ 'profile' ] = $ data [ 'profile' ] ; $ people [ 'featured_image' ] = $ data [ 'featured_image' ] ; if ( $ people -> save ( ) ) { // Return the new ID return $ people -> id ; } return false ; }
INSERT INTO 'peoples'

@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 peoples