Skip to content

rsandipermana/i-mraladin

Repository files navigation

Build Status Total Downloads Latest Stable Version License

About Project

This project special for Mister Aladin. Required: Docker-compose

Step to install this project :

  1. docker-compose up to run the application
  2. docker-compose exec app composer install will generate depedencies in vendor folder
  3. cp .env.example .env to copy environtment configuration
  4. docker-compose exec app php artisan migrate
  5. Project will run on http://localhost:8088, and check database on http://localhost:8081 (user: root password: secret)

Project created with Laravel Framework, included:

  • Get Short URL and Redirect to Long URL
  • Create Long URL and Generate Short URL (format: MA-randomURL)
  • Update Direct URL
  • Delete Direct URL

GET

Direct Short URL to Long URL

Example URL: http://localhost:8088/MA-LS5NA You will redirect to: http://misteraladin.com/hotel/search?q=jakarta&m=12&d=1

CREATE

Generate Short URL

Example Response:

{
"message": "data successfully created",
"data": {
    "shorturl": "MA-LS5NA",
    "longurl": "http://misteraladin.com/hotel/search?q=jakarta&m=12&d=1",
    "updated_at": "2019-08-19 17:07:12",
    "created_at": "2019-08-19 17:07:12",
    "id": 10
}
}

UPDATE

Update Long URL

Example Response:

{
"message": "data successfully updated"
}

DELETE

Delete URL by ID

Example Response:

{
"message": "data successfully deleted"
}

THANKS

The Laravel framework is open-source software licensed under the MIT license. Project special for Mister Aladin. Project developed by Sandi Permana

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published