Does thinkphp3.2 have a callback event after searching the database?

the desired effect is that all methods that manipulate the database in the project perform some custom actions after successful execution.
frameworks such as laravel have corresponding solutions, such as throwing events.

Mar.01,2021

decorator can not


hook can not


open transaction, only after the operation is successful, then commit commits the transaction, and if the operation fails, rollback rollback.
$model- > startTrans ();
$row = $model- > where (['id'= > 1])-> update ([' status'= > 4]);
if ($row > 0) {
/ / the above operation succeeded
/ / perform custom action
$model- > commit ();
} else {
$model- > rollback ();
}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b844-45624.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b844-45624.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?