You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! first of all thanks for the package, it has been very usefull for me.
I recently had a use case where I needed to add a custom prefix per short_url to allow tenants add their own slug to make the url more readable and unique (example: https://myshortdomain.com/{customPrefix}/{urlKey})
I implemented the logic in my code and wanted to check if it is something anyone would use, so I maybe PR it to the repo.
To add a custom prefix to a shortUrl you can use a new ->customPrefix() method. Example:
use AshAllenDesign\ShortURL\Classes\Builder;
$shortURLObject = app(Builder::class)->destinationUrl('https://destination.com')->customPrefix('custom-prefix')->make();
$shortURL = $shortURLObject->default_short_url;
// Short URL: https://webapp.com/custom-prefix/random-key
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! first of all thanks for the package, it has been very usefull for me.
I recently had a use case where I needed to add a custom prefix per short_url to allow tenants add their own slug to make the url more readable and unique (example: https://myshortdomain.com/{customPrefix}/{urlKey})
I implemented the logic in my code and wanted to check if it is something anyone would use, so I maybe PR it to the repo.
To add a custom prefix to a shortUrl you can use a new
->customPrefix()
method. Example:Beta Was this translation helpful? Give feedback.
All reactions