Looking to hire Laravel developers? Try LaraJobs

laravel-batch-db maintained by haben

Description
Proper batch insert and update on Laravel
Author
Last update
2021/05/21 11:53 (dev-main)
License
Links
Downloads
32

Comments
comments powered by Disqus

laravel-batch-db :construction:

EARLY STAGE OF DEVELOPMENT

Basic Usage

<?php

use Haben\Facades\BatchDB;

// or

$batchDb = new BatchDB('optionalDatabaseConnectionName');
BatchDB::upsert('tableName', []);

// or

$dbConn = DB::connection('databaseConnectionName');
BatchDB::upsert('tableName', [], $dbConn);

// or

BatchDB::connection('databaseConnectionName')->upsert('tableName', []);

API

insert

Perform a batch insert.

insertAndGet

Perform a batch insert and get the inserted items.

upsert

Perform a batch upsert (insert or update) via INSERT ... ON DUPLICATE KEY UPDATE.

License

MIT