public function create($options = [])
    {
        $capsule = $this->_database->getCapsule();
        if (empty($options) || !is_array($options)) {
            throw new \Exception('Create options must not be empty and must be an instance of an array!');
        }

        // filter out options not given in fillable array
        $this->filter($options);

        $options['created_at'] = date('Y-m-d h:i:s');
        $options['updated_at'] = $options['created_at'];

        if ($capsule->table($this->table)->insert($options)) {
            return true;
        } else {
            return false;
        }
    }
public function create($options = [])
    {
        $capsule = $this->_database->getCapsule();
        if (empty($options) || !is_array($options)) {
            throw new \Exception('Create options must not be empty and must be an instance of an array!');
        }

        // filter out options not given in fillable array
        $this->filter($options);

        $options['created_at'] = date('Y-m-d h:i:s');
        $options['updated_at'] = $options['created_at'];

        if ($capsule->table($this->table)->insert($options)) {
            return true;
        } else {
            return false;
        }
    }
public function create ( $ options = [ ] ) { $ capsule = $ this -> _database -> getCapsule ( ) ; if ( empty ( $ options ) || ! is_array ( $ options ) ) { throw new \ Exception ( 'Create options must not be empty and must be an instance of an array!' ) ; } // filter out options not given in fillable array $ this -> filter ( $ options ) ; $ options [ 'created_at' ] = date ( 'Y-m-d h:i:s' ) ; $ options [ 'updated_at' ] = $ options [ 'created_at' ] ; if ( $ capsule -> table ( $ this -> table ) -> insert ( $ options ) ) { return true ; } else { return false ; } }
Creates a new table row.

@return bool
Creates a new table row .