SS
public function create(array $attributes = [])
{
// Start transaction!
$this->beginTransaction();
try {
$result = parent::create($attributes);
} catch (\Exception $e) {
// Rollback if something went wrong
$this->rollback();
throw $e;
}
// Commit the queries!
$this->commit();
return $result;
}
а в контроллере try catch и в catch rollback