{"id":20618408,"url":"https://github.com/oawu/maple","last_synced_at":"2026-04-16T20:39:26.444Z","repository":{"id":83766208,"uuid":"146241887","full_name":"oawu/Maple","owner":"oawu","description":"🍁 飛起來 🍁 飛過來","archived":false,"fork":false,"pushed_at":"2025-01-07T09:46:51.000Z","size":2800,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T04:47:58.312Z","etag":null,"topics":["activerecord","apidoc","cli","maple","migration","mysql","php","phpframework"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oawu.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-27T03:23:47.000Z","updated_at":"2025-01-07T09:47:00.000Z","dependencies_parsed_at":"2024-01-16T08:36:41.284Z","dependency_job_id":"513e0183-8e95-403e-8b07-cee10f231329","html_url":"https://github.com/oawu/Maple","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oawu%2FMaple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oawu%2FMaple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oawu%2FMaple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oawu%2FMaple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oawu","download_url":"https://codeload.github.com/oawu/Maple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277654,"owners_count":20101536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","apidoc","cli","maple","migration","mysql","php","phpframework"],"created_at":"2024-11-16T12:08:17.168Z","updated_at":"2026-04-16T20:39:26.371Z","avatar_url":"https://github.com/oawu.png","language":"PHP","readme":"# 歡迎來到 Maple 8\n\n🍁 飛起來 🍁 飛過來\n\n## 說明\n* 這是一套 [OA Wu](https://www.ioa.tw/) 所製作的個人 [PHP](http://php.net/) 框架！\n* 此框架僅支援 PHP 7.0（包含）以上。  \n* 主要大功能如下：\n  * 指令控制框架\n  * 針對資料庫採用 Migration 管理\n  * Model 採用 [Maple-ORM](https://github.com/oawu/Maple-ORM)([2.0+](https://github.com/oawu/Maple-ORM/releases/tag/2.0.0)) 的 [Active Record](https://zh.wikipedia.org/zh-tw/Active_Record) 設計\n  * 採用 [Deployer](https://deploye4.r.org/) 快速部署至伺服器\n\n* 製作參考如下：\n  * [CodeIgniter](https://www.codeigniter.com/)\n  * [OACI](https://github.com/oawu/oaci)\n  * [Maple4](https://github.com/oawu/Maple/tree/4.0.13)\n  * [Maple7](https://github.com/oawu/Maple/tree/7.1.5)\n  * [php-activerecord](https://github.com/jpfuentes2/php-activerecord)\n\n## 初始化專案\n專案最初開始通常需要一些結構目錄的建置，例如 Cache、Log 或環境檔案設定等，所以需要執行初始動作。\n初始方法於專案目錄下執行指令 `php Maple.php init` 後，依據所需即可建立初始所需的目錄結構。\n\n* 開發站 `php Maple.php init Development`\n* 測試站 `php Maple.php init Testing`\n* 準備站 `php Maple.php init Staging`\n* 正式站 `php Maple.php init Production`\n\n\n## 部署專案\n專案部署更新至伺服器前請先確認以下幾項步驟：\n\n1. 請至伺服器將專案建置起來。\n\n2. 確認伺服器上的專案可以正常使用 `git pull`。 \n\n3. 將伺服器上的專案初始化，方式就是在伺服器上的專案執行 `php Maple.php init` 選擇初始專案。\n\n4. 因為部署過程會自動更新 **Migration**，故請先確認伺服器上的專案是否可正常連至資料庫。\n\n5. 因為部署過程中會使用 [SSH](https://zh.wikipedia.org/wiki/Secure_Shell) 方式連線，所以請確認本地端是否可以使用 `公鑰` 的方式連線至伺服器。\n\n6. 請先在本地安裝部署工具 [Deployer](https://deployer.org/)，安裝方式則執行以下指令：\n  * `curl -LO https://deployer.org/deployer.phar`\n  * `mv deployer.phar /usr/local/bin/dep`\n  * `chmod +x /usr/local/bin/dep`\n\n7. 請在本地專案下的 `Config/{ENVIRONMENT}/Deploy.php` 設定部署資訊。\n\n\n確認以上步驟後，即可使用 Maple7 指令部署，使用方式只要在專案目錄下打開終端機，執行指令 `php Maple.php deploy` 後依據引導步驟後即可開始部署。\n\n## 新增 Migration\n在專案目錄下打開終端機，執行指令 `php Maple.php create -I` 即可。\n\n## 新增 Model\n在專案目錄下打開終端機，執行指令 `php Maple.php create -M` 即可。\n\n## 執行 Migration\n在專案目錄下打開終端機，執行指令 `php Maple.php migration` 即可。\n\n\u003e 更新至最新版可以下指令 `php Maple.php migration new`。  \n\u003e 重置 Migration 可以下指令 `php Maple.php migration -R`。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foawu%2Fmaple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foawu%2Fmaple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foawu%2Fmaple/lists"}