Answers for "laravel use custom database"

PHP
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

Writing into the database with one click laravel

public function manuelSignUP()
{
DB :: table("users") -> insertGetId
(
array("firstname" => "John", "lastname"=> "John",
"passwordHash" => "password", "userslevelID" => 2)
);

DB :: table("userlevel") -> insertGetID
  (

array("userlevelID" => $userlevelID, "name" => $name)
 );

 return view("pages.manualsignup");
 }
Posted by: Guest on October-23-2020

Code answers related to "laravel use custom database"

Browse Popular Code Answers by Language