Giter VIP home page Giter VIP logo

todo-laravel-dingo-api-swagger's Introduction

「TODOリスト」LaravelでAPI実装

シンプルなAPIは、Laravelで構築されたToDoリストを管理する。

  • TODO(やること)を登録できる
  • 登録したTODOを変更できる
  • 登録したTODOを削除できる
  • 登録されているTODOを一覧で表示できる
  • 登録したTODOの完了状態をメモする

Requirements

PHP 7.3 or higher
Laravel 8.0 or higher

Installation

  1. Clone the repo locally:

    git clone [email protected]:colyii/clara-coly-todo.git
    cd clara-coly-todo
  2. Install dependencies

    composer install
  3. Copy the contents of .env.example to a .env file, or simply run this command:

    # Mac Linux
    cp .env.example .env
    # Windows
    copy .env.example .env
  4. Generate application key (if not already generated)

    php artisan key:generate
  5. Run database migrations

    php artisan migrate
  6. Run database seed

    php artisan db:seed
  7. Run the dev server (the output will give the address):

    php artisan serve --host=127.0.0.1 --port=8000

Running tests

./vendor/bin/pest --filter TodoTest

or

php artisan test

返回结果

// 成功
{
    "success": 1,
    "message": "TODOを表示しました。",
    "status_code": 200,
    "data": {
        "id": 4,
        ...
        "created_at": "2022-08-24 00:12:47",
        "updated_at": "2022-08-24 00:12:47",
        ...
    }
}

// 失败
{
    "success": 0,
    "message": "TODO情報が見つかりませんでした。",
    "status_code": 404
}

Demo

https://todo-laravel-dingo-api-swagger.herokuapp.com/

Pending

  • Add JWT
  • Add Docker

todo-laravel-dingo-api-swagger's People

Contributors

ryougenn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.