Skip to content

Project KK4 Web Programming and Mobile Device Laravel #2

License

Notifications You must be signed in to change notification settings

mardhanawn/laravel-routing

Repository files navigation

Laravel API - Module-02 Routing

Laravel API Project - Dingo Api implementation

Tutorials

Challenge

  • Clone this repositories
  • Install depedencies
$ composer install
  • Create .env file
$ cp .env.example .env
  • Genereate laravel key
$ php artisan key:generate
  • Create API Endpoint using dingo/api with conditions:
  1. /me : will display biodata, use GET method
  2. /login : for login process, use POST method
  3. /register: for register login, use POST method
  4. /logout: will destroy token, use DELETE method
  • Show list of router
$ php artisan api:routes
  • Use the postman to check the API that has been made
  • Push project to this repositories
  • Take a screenshot of your repositories link, postman process/output and then post to the KK4-B Google Classroom

Example Output

  • endpoint /me, access using GET method
{
    "status": 200,
    "data": {
        "name": "Indra Hehe Aja",
        "nickname": "goeroeku",
        "gender": "Male",
        "class": "Pro Akut"
    }
}
  • endpoint /login and /register, access using POST method
{
    "status": 204,
    "data": "Success"
}
  • endpoint /logout, access using DELETE method
{
    "status": 204,
    "data": "Success"
}

About

Project KK4 Web Programming and Mobile Device Laravel #2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages