Skip to content

PHP code snippet – How to check if query is successfully inserted laravel?

try {
        DB::beginTransaction();

        // your code

        DB::commit();
    }catch (Exception $e) {

        DB::rollback();

        // other actions

    }
See also  How to check type of primitive value in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.