Giter Club home page Giter Club logo

bulletin_board's Introduction

bulletin_board

使用Laravel 的後端佈告欄服務

Build Setup

# install dependencies
composer install

# 建立資料庫
php artisan migrate

# 啟動一個內建伺服器http://localhost:8000或自行搭建HTTP伺服器指向public目錄
php artisan serve

API


取得佈告欄列表

Api Url : /

Method : GET

Response :

名稱 格式 說明
code int 請求狀態 1:成功 0:失敗
data array 列表資料
{
    "code": 1,
    "data": {
        "id": 1,
        "title": "title",
        "content": "content",
        "created_at": "2022-12-12 12:00:00",
        "updated_at": "2022-12-12 12:00:00",
    }
}

新增佈告欄

Api Url : /create

Method : POST

Content-Type : application/json

Parameter :

名稱 格式 說明
title string 標題
content string 內容

Response :

名稱 格式 說明
code int 請求狀態 1:成功 0:失敗
message string 回應訊息
{
    "code": 1,
    "message": "新增成功"
}

修改佈告欄

Api Url : /edit

Method : PATCH

Content-Type : application/json

Parameter :

名稱 格式 說明
id int 佈告欄ID
title string 標題
content string 內容

Response :

名稱 格式 說明
code int 請求狀態 1:成功 0:失敗
message string 回應訊息
{
    "code": 1,
    "message": "修改成功"
}

刪除佈告欄

Api Url : /{id}/delete

Method : DELETE

Content-Type : application/json

Response :

名稱 格式 說明
code int 請求狀態 1:成功 0:失敗
message string 回應訊息
{
    "code": 1,
    "message": "刪除成功"
}

bulletin_board's People

Contributors

w84a832k6 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.