I am using MyISAM for MySQL and I want to use transaction here is my code:
DB::transaction(function () {
$project = Project::find($id);
$project->users()->detach();
$project->delete();
});
This code execute succesfuly but I am not sure that transaction works... How can I test it?