i have never worked with any php framework before. Its funny to see that back when i started learning php i designed a request handler that seems pretty similar to this piece of laravel.
Amazing stuff. I did sth weird to handle this . I added a helper method that returned an array with the key being the"Exception::class" and the value being either an array or a closure that returns an array as well this array always has a code and a message . this way I managed to also handle Laravel's own exceptions but your way of doing it is the Laravel way through the register method
I love your channel and content, but its almost impossible remember your channel name when i want rewatch some video as a brazillian, have you considered rename the channel for something more acessible since your content is global?
Although I like this way of structuring exceptions, with multiple static returns per class. Clean and short. I found few minor caveats: - in tests you may need to target exception code or message in addition to class name to assert the exact method thrown. - same thing in Laravel exception handler, if you need to target particular static method.
Great idea. But, you didn't consider that some of your audience may not be any where as good as you, and therefore simplify more and slowly. Still, thank you very much. I may not be able to replicate what you've done!