The following code throws an exception that I can't catch for whatever reason.
try {
$this->date = \Carbon\Carbon::parse($this->date)->toDateString();
}
catch (Exception $err) {
$this->date = \Carbon\Carbon::parse("January 1st 1900")->toDateString();
}
Now, if I put this in my routes file in a function closure, it works fine. It's only throwing an exception when it's called from the Model.
exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Summer 2015) at position 0 (S): The timezone could not be found in the database' in /home/vagrant/www/steamcompare/vendor/nesbot/carbon/src/Carbon/Carbon.php:222
Has anyone else had this issue with Carbon?