Backend URL Shortener to integrate with frontend following frontend: vue-url-shortener.
NOTE: SQLite is enabled to use.
- REST API Design
- Generate url shortener
- Redirect shortener to original ones
- Database storage
NOTE: there are 2 of 5 tests deployed
php artisan test --filter=UrlShortenerTest
POST
/api/shortener
Generate URL Shortener
name type data type description url
required string (255) The url to be shortened
http code content-type response 200
application/json
JSON string
curl -X GET -H "Content-Type: application/json" http://localhost:8889/api/shortener