# nextdrive 交接文件 ### 後端 composer 安裝教學 https://ithelp.ithome.com.tw/articles/10238405 安裝完後進到專案資料夾 `cp .env.example .env` 假設本地端已經有 mysql 服務 修改 `.env` 中 ``` DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE={你的資料庫} DB_USERNAME=root DB_PASSWORD= ``` 執行以下指令 * `composer install` * `php artisan key:generate` * `php artisan jwt:secret` * `php artisan migrate` * `php artisan db:seed` * `npm install` * `npm run dev` * `php artisan serve` 這時打開網站 `http://127.0.0.1:8000` 即可 資料庫 `model` 定義請參照 `app` 資料夾底下的 `.php` 資料庫 migration 在 `database/migrations` 裡面 因 `ues` 和 `bms` 前端頁面顯示的原因,故將 `gateway_pid` 拆成另一張表。 `bms` 的 `gateway_pid` 存進 `vehicles` 當中,其餘放在 `bms`。 `ues` 的 `gateway_pid` 存進 `ues` 當中,其餘放在 `ues_logs`。 乘客 `passengers` 則獨立一張表,並和 `vehicles` 做關聯 #### Bluetechno API 功能寫在 `app/Http/Controllers` 當中 - `BmsController` - `GpsController` - `UesController` #### 前端 api 功能寫在 `app/Http/Controllers/Admin` 當中 - `PassengerController` - `UesController` - `VehicleController` #### 前端登入功能 `app/Http/Controllers/Auth` #### 匯出功能 `app/Http/Controllers/Export` #### route 對應 controller 在 `routes` 當中 #### 前後端使用 jwt 驗證文件如下 https://jwt-auth.readthedocs.io/en/develop/quick-start/ #### api 文件 https://documenter.getpostman.com/view/1844296/SWLZf9xE
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up