Search
 
SCRIPT & CODE EXAMPLE
 

PHP

DB::rollBack()

/* method provided by the DB facade: */
use IlluminateSupportFacadesDB;
 
DB::beginTransaction();
//You can rollback the transaction via the rollBack method:
DB::rollBack();
//Lastly, you can commit a transaction via the commit method:
DB::commit();
//EXP : 
// Open a try/catch block
try {
    // Begin a transaction
    DB::beginTransaction();
    // Do something and save to the db...
  
    // Commit the transaction
    DB::commit();
} catch (Exception $e) {
    // An error occured; cancel the transaction...
    DB::rollback();
    // and throw the error again.
    throw $e;
}
Comment

PREVIOUS NEXT
Code Example
Php :: php preg_replace whitespace 
Php :: php remove item array 
Php :: php unique string 
Php :: lluminateHttpExceptionsPostTooLargeException 
Php :: laravel base url 
Php :: get type of variable php 
Php :: php remove notice session already been started 
Php :: header location in php 
Php :: open php ini from terminal 
Php :: generate token in php 
Php :: image exists in laravel 
Php :: validate executable path vscode 
Php :: object to string php 
Php :: clear laravel cache 
Php :: php loop backwards through array 
Php :: php artisan migrate could not find driver 
Php :: php download rate limit 
Php :: specified key was too long max key length is 767 bytes 
Php :: php find key in array 
Php :: array_map class method 
Php :: tackle discount in php laravel blade 
Php :: php remove empty values from array 
Php :: php in array 
Php :: how to request user input in php 
Php :: unset session in php 
Php :: remove first character from string laravel 
Php :: alter mysql 8 user root phpmyadmin first install 
Php :: Woocommerce Display field value on the admin order edit page [Custom Field Display 2] 
Php :: Laravel Auth Redirect based on role 
Php :: woocommerce get post terms product 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =