Laravel Rzuć wyjątek z kodem stanu
try {
throw new Exception("Some error message", 30);
//here 30 is the custom code
} catch(Exception $e) {
echo "The exception code is: " . $e->getCode();
}
Indian Gooner