- Step 1
composer create-project --prefer-dist laravel/laravel projectname "6.0.*"
- Step 2 開啟開發環境網頁伺服器
cd projectname
php artisan serve
- Step 3 Ubike API
php artisan make:model Ubike -c
## app/Http/Controller/UbikeController.php
-
Step 4 User API 待補
-
Step 5 自動產生API文件
## 安裝套件
composer require --dev mpociot/laravel-apidoc-generator
## 配置檔案
php artisan vendor:publish --provider="Mpociot\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-config
## 產生API 文件
php artisan apidoc:generate
-
User
-
Register
- restful method: post
-
Login
- restful method: post
-
Logout
- restful method: get
-
Userinfo
- restful method: get
-
Update
- restful method: put
-
Delete
- restful method: delete
-
-
Ubike
-
All
- restful method: get
-
Alone
- restful method: get
-