New answers tagged logic-programming
First off, even though PHP is class case insensitive I would rewrite EXCEPTION to Exception as it's easier to read. Also, you're missing a few semi colons. I would fix those few things first! I'm not very familiar with the the Laravel database classes, but I assume you're using Eloquent? If so you may be able to catch the \Illuminate\Database\QueryException ...
Top 50 recent answers are included