How to parse Carbon dates with useful macro in Laravel

When you try to parse a date with Carbon, by default it will throw an exception when parsing an invalid date format. So you need to manually try/catch the exception in your code. But sometimes, you might need a false value rather than dealing with the exception. So here is the macro that will help […]