YorCreative / Laravel-UrlShortener

A Laravel URL Shortener package that provides URL redirects with optionally protected URL password, Hidden UTM parameter tracing, URL expiration, open limits before expiration, ability to set feature activation dates, and click tracking out of the box for your Laravel applications.
MIT License
98 stars 15 forks source link

A method where argument is plain_text url, if already exists, return the shorten one or create new one instead of throwing exceptions #19

Open aleedksa opened 3 months ago

yordadev commented 3 months ago

Hey @aleedksa thanks for submitting this issue.

I'm actively working on version 3 of this package. This update specifically addresses the issue of duplicate URLs, allowing them if the configuration is set accordingly. The package appends ?x_dup_link_id={uuid} to the URL before hashing it for the signature. An accessor on the ShortUrl model removes the x_dup_link_id={uuid}when using plain_text.

I'm aiming to submit a pull request next week for feedback before releasing version 3. It's a rather significant update.

I will leave this open until the release.