mySQL trigger cause laravel application to hang

I have a trigger which updates another table(budget) after an insert to ledger table.

I can see that the execution is successful as the data is reflected on the tables but my page
is just a blank screen.

I am using laravel and mysql.

I was thinking if I can improve my trigger as I believe it is wheats causing the issue.

Here is the snippet of my code.

enter image description here