Answers for "laravel db connection"

PHP
0

check which database connect laravel

DB::connection();
Posted by: Guest on December-10-2020
3

DB::transaction

use Illuminate\Support\Facades\DB;

DB::transaction(function () {
    DB::update('update users set votes = 1');

    DB::delete('delete from posts');
});
Posted by: Guest on December-09-2020
0

DB::connection('local')->create() laravel

$users = DB::connection('foo')->select(...);
Posted by: Guest on August-24-2021

Browse Popular Code Answers by Language