ash-jc-allen / short-url

A Laravel package for creating shortened URLs for your web apps.
MIT License
1.27k stars 162 forks source link

Moved dates to casts for compatibility with Laravel 10 #181

Closed boris-glumpler closed 1 year ago

boris-glumpler commented 1 year ago

As the title says, this is just a small change that moves the dates property to the $casts property . It was deprecated in an earlier release and has been removed for Laravel 10.

Here is the relevant entry in the upgrade guide: https://laravel.com/docs/10.x/upgrade#model-dates-property

ash-jc-allen commented 1 year ago

Hey @boris-glumpler, thanks for the PR. I can't believe I missed this change when doing the Laravel 10 upgrade! I'll take a look at this at some point this week and hopefully get it merged in 😄

boris-glumpler commented 1 year ago

It happens 😉 Thanks!

ash-jc-allen commented 1 year ago

FYI: I've just put a quick PR together to prove that the dates are broken in Laravel 10 🙂

https://github.com/ash-jc-allen/short-url/pull/182

ash-jc-allen commented 1 year ago

I've opted for adding the dates field back in for anyone that might still be using it in apps running Laravel 9 downwards. But I've added a deprecation comment so people know it'll be removed in a future version 🙂