Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

DB::transaction

use IlluminateSupportFacadesDB;

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

    DB::delete('delete from posts');
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+6 =