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  PHP code snippet - How to retrieve data from database using select option in laravel?

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.