<?php namespace NetSTI\System\Models;

use Illuminate\Database\Eloquent\ModelNotFoundException;

class ContactsImport extends \Backend\Models\ImportModel
{
    protected $rules = [];
    public function importData($results, $sessionKey = null)
    {
        foreach ($results as $row => $data) {

            try {
                $entry = new Contact;
                $entry->fill($data);
                $entry->save();
                $this->logUpdated();
            }catch (\Exception $ex) {
                $this->logError($row, $ex->getMessage());
            }

        }
    }
}

?>