Prevent default error website when getting error from a DataBase transaction
Permalink
Hello!
I want to know how to prevent the default error website to be shown and instead just get the code in order to return it with an `echo json_encode()`
Thank you
I want to know how to prevent the default error website to be shown and instead just get the code in order to return it with an `echo json_encode()`
Thank you
BTW, here's what you can do:
1) Edit the file application/config/app.php:
2) Create a new file at application/src/Custom/CustomWhoopsServiceProvider.php:
3) Create a new file at application/src/Custom/DatabaseExceptionHandler.php: