Short URL component
Turns any page into a short URL generator.
Example short URL system
Note: choose the URL of your Short URL page wisely; once people start using it you cannot change it without breaking everyones generated Short URLs.
Step 1. Add to any controller action:
If you will be using the
Step 2. Add to your view:
Example short URL system
Note: choose the URL of your Short URL page wisely; once people start using it you cannot change it without breaking everyones generated Short URLs.
Step 1. Add to any controller action:
get::component('shorturl');
If you will be using the
index()
action (this is recommended for a short URL system) then you will also need to add to the controller class: const optionalAction = true;
Step 2. Add to your view:
load::element('shorturl');