diff --git a/README.md b/README.md index 8da3f5f..ee7db2e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,56 @@ Bổ sung thêm 1 số thư viện mở rộng, helpers liên quan Support mô hình HMVC +## Hướng dẫn tích hợp mô hình HMVC vào dự án + +1. Create folder: `modules` trong thư mục `application`. Tham khảo cấu trúc thư mục `modules` tại `sample/modules/` trong thư viện này + +```shell +. +└── modules + └── startup + ├── config + │ ├── index.html + │ └── routes.php + ├── controllers + │ ├── Startup.php + │ └── index.html + ├── index.html + ├── models + │ ├── Startup_model.php + │ └── index.html + └── views + └── index.html + +6 directories, 8 files +``` + +2. Create file `hmvc.php` với nội dung như sau + +```php + '../modules/' +); + +``` + +3. Nạp file `hmvc.php` vào file `config.php` + +```php +require_once __DIR__ . '/hmvc.php'; +``` + +4. Triển khai viết code trong thư mục modules mới + ## Liên hệ | Name | Email | Skype | Facebook | diff --git a/sample/modules/startup/config/index.html b/sample/modules/startup/config/index.html new file mode 100644 index 0000000..b702fbc --- /dev/null +++ b/sample/modules/startup/config/index.html @@ -0,0 +1,11 @@ + + +
+Directory access is forbidden.
+ + + diff --git a/sample/modules/startup/config/routes.php b/sample/modules/startup/config/routes.php new file mode 100644 index 0000000..680f48f --- /dev/null +++ b/sample/modules/startup/config/routes.php @@ -0,0 +1,11 @@ + + * Copyright: 713uk13mDirectory access is forbidden.
+ + + diff --git a/sample/modules/startup/index.html b/sample/modules/startup/index.html new file mode 100644 index 0000000..b702fbc --- /dev/null +++ b/sample/modules/startup/index.html @@ -0,0 +1,11 @@ + + + +Directory access is forbidden.
+ + + diff --git a/sample/modules/startup/models/Startup_model.php b/sample/modules/startup/models/Startup_model.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/sample/modules/startup/models/Startup_model.php @@ -0,0 +1 @@ + + + +Directory access is forbidden.
+ + + diff --git a/sample/modules/startup/views/index.html b/sample/modules/startup/views/index.html new file mode 100644 index 0000000..b702fbc --- /dev/null +++ b/sample/modules/startup/views/index.html @@ -0,0 +1,11 @@ + + + +Directory access is forbidden.
+ + +