Download the PHP package kerwin/simpleframe without Composer
On this page you can find all versions of the php package kerwin/simpleframe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package simpleframe
目錄
- 系統資訊
- Database
- 介紹
- 指令
- Container
- Controller
- Model
- 介紹
- 設定主鍵
- 將Models加入Container
- 功能
- View
- 介紹
- LayoutExtension
- 應用
- Route
- 介紹
- 應用
- Middleware
- 介紹
- 應用
- Log
- 介紹
- 應用
系統資訊
🔼
- 開發環境
PHP | 7.4.13 |
MariaDB | 10.4.17 |
Apache | 2.4.46 |
1. 安裝框架
- 編輯設定檔
.env
2. 安裝npm套件
3. 建立tailwind css
開發時使用:
開發完成後使用:
- tailwind css相關設定到
tailwind.config.js
設定 - 設定tailwind css 檔案輸出路徑請到
package.json
的scripts
設定
4. 設定webpack
開發時使用:
開發完成後使用:
- webpack 相關設定請到
webpack.config.js
設定
5. setting.php
- config/setting.php 中可以設定允許看見錯誤訊息的ip清單
6. .htaccess
- RewriteBase 你的路徑
7. 建立資料庫及資料
8. 降php版本
-
在composer.json中加入,以降至7.2版本為例
- 刪除
composer.lock
及/vender
後執行composer update
Database
🔼
介紹
使用robmorgan/phinx,透過指令的方式將資料表建立或加入測試資料。
資料表schema放在/database/migrations
底下,資料建立放在/database/seeds
底下。
如果要更改放置位子可以到
/phinx.php
中修改
phinx.php
指令
建立migration
詳細請參考這裡
Container
🔼
在app\config.php
中加入設定並透過app\bootstrap.php
執行。
相關設定請參考: https://php-di.org/
Controller
🔼
放在app\Http\Controller
底下,function可以使用加入Container
的類別(class)
Model
🔼
介紹
放在app\Models
底下,必須要加入Container,可以對。
設定主鍵
將Models加入Container
功能
all
回傳全部列數資料
find
回傳特定主鍵資料
insert
新增資料
update
更新資料
delete
刪除資料
View
🔼
介紹
View是使用Twig,透過Route將View呈現出來
LayoutExtension
設定View Extension
SimpleFrame已經做一些基本的設定,位於App\Services\Twig\LayoutExtension.php
,相關設定可以參考這裡。
應用
index.twig
Route
🔼
介紹
路由是使用nikic/FastRoute為基底做修改,在simpleframe/index.php
中設定
應用
Middleware
🔼
介紹
-
中間件必須建立在
App\Http\Middleware
底下,必須使用抽象類別Kerwin\Core\Router\Middleware\Middleware
。 -
建立中間件後必須要加入Container。
- 中間件設定必須加在
addRoute
或addGroup
前方,如果加在addGroup
則底下路由都會生效。
應用
Middleware
Container
Route
Log
🔼
介紹
使用monolog
搭配自己建立的PDOHandler
將Log資料儲存在資料庫中,已經有將Log加入Container中
應用
All versions of simpleframe with dependencies
robmorgan/phinx Version ^0.12.5
fzaninotto/faker Version ^1.9
wixel/gump Version ^1.12
maximebf/debugbar Version ^1.16
kerwin/core Version dev-main
kerwin/captcha Version ^1.0
monolog/monolog Version ^2.3
guzzlehttp/guzzle Version ^7.3
jenssegers/agent Version ^2.6
php-di/php-di Version ^6.3
twig/twig Version ^3.3
nikic/fast-route Version ^1.3
symfony/var-dumper Version ^5.3