Skip to content

Commit e88ef35

Browse files
Initial app
0 parents  commit e88ef35

95 files changed

Lines changed: 8693 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#-------------------------
2+
# Operating Specific Junk Files
3+
#-------------------------
4+
5+
# OS X
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# OS X Thumbnails
11+
._*
12+
13+
# Windows image file caches
14+
Thumbs.db
15+
ehthumbs.db
16+
Desktop.ini
17+
18+
# Recycle Bin used on file shares
19+
$RECYCLE.BIN/
20+
21+
# Windows Installer files
22+
*.cab
23+
*.msi
24+
*.msm
25+
*.msp
26+
27+
# Windows shortcuts
28+
*.lnk
29+
30+
# Linux
31+
*~
32+
33+
# KDE directory preferences
34+
.directory
35+
36+
# Linux trash folder which might appear on any partition or disk
37+
.Trash-*
38+
39+
#-------------------------
40+
# Environment Files
41+
#-------------------------
42+
# These should never be under version control,
43+
# as it poses a security risk.
44+
.env
45+
.vagrant
46+
Vagrantfile
47+
48+
#-------------------------
49+
# Temporary Files
50+
#-------------------------
51+
writable/cache/*
52+
!writable/cache/index.html
53+
54+
writable/logs/*
55+
!writable/logs/index.html
56+
57+
writable/session/*
58+
!writable/session/index.html
59+
60+
writable/uploads/*
61+
!writable/uploads/index.html
62+
63+
writable/debugbar/*
64+
!writable/debugbar/.gitkeep
65+
66+
php_errors.log
67+
68+
#-------------------------
69+
# User Guide Temp Files
70+
#-------------------------
71+
user_guide_src/build/*
72+
user_guide_src/cilexer/build/*
73+
user_guide_src/cilexer/dist/*
74+
user_guide_src/cilexer/pycilexer.egg-info/*
75+
76+
#-------------------------
77+
# Test Files
78+
#-------------------------
79+
tests/coverage*
80+
81+
# Don't save phpunit under version control.
82+
phpunit
83+
84+
#-------------------------
85+
# Composer
86+
#-------------------------
87+
vendor
88+
89+
#-------------------------
90+
# IDE / Development Files
91+
#-------------------------
92+
93+
# Modules Testing
94+
_modules/*
95+
96+
# phpenv local config
97+
.php-version
98+
99+
# Jetbrains editors (PHPStorm, etc)
100+
.idea/
101+
*.iml
102+
103+
# Netbeans
104+
nbproject/
105+
build/
106+
nbbuild/
107+
dist/
108+
nbdist/
109+
nbactions.xml
110+
nb-configuration.xml
111+
.nb-gradle/
112+
113+
# Sublime Text
114+
*.tmlanguage.cache
115+
*.tmPreferences.cache
116+
*.stTheme.cache
117+
*.sublime-workspace
118+
*.sublime-project
119+
.phpintel
120+
/api/
121+
122+
# Visual Studio Code
123+
.vscode/
124+
125+
/results/
126+
/phpunit*.xml
127+
/.phpunit.*.cache
128+

CONTRIBUTE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Contribute
3+
To contribute to this repository and extend its architectural capabilities or you find an issue, even if it's not very important/critical, please feel free to create an issue, follow these steps:
4+
5+
1. [Open an issue](https://github.com/Simpletine/CodeIgniter4-HMVC/issues/new/choose) with detailed information.
6+
2. Create and push a new branch with your changes.
7+
3. [Create a pull request](https://github.com/Simpletine/CodeIgniter4-HMVC/compare), referencing the issue you addressed.
8+
9+
10+
### Git Command Line
11+
To specify the issue, include the issue number in the name of the new branch. This approach ensures clarity and organization
12+
```bash
13+
git checkout -b issue-10
14+
```
15+
16+
Double-check the files that have been changed to ensure accuracy and completeness
17+
```bash
18+
git status
19+
```
20+
Adding all the changed files to the list
21+
```bash
22+
git add .
23+
```
24+
Commit the changes with a descriptive message
25+
```bash
26+
git commit -m "Solved Issue 10, fixed code in SomeFIle.php"
27+
```
28+
Set the upstream branch to push your work from local
29+
```bash
30+
git push --set-upstream origin issue-10
31+
```
32+
#### Now you have completely push your work to the repository.
33+
[Create a pull request](https://github.com/Simpletine/CodeIgniter4-HMVC/compare) referencing the changes, fixes, and additions. The more detailed, the better. You can use dots, numbers, and code snippets to describe your changes.
34+
35+
If you have useful commands from Spark, Composer, or shell scripts, please include them. We will consolidate the information and add it to the markdown file for others to use easily.

INSTALLING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Initial
2+
3+
Clone project to your project root folder
4+
```bash
5+
composer create-project simpletine/codeigniter4-hmvc ci4_hmvc --stability=dev
6+
```
7+
Or
8+
```bash
9+
git clone https://github.com/Simpletine/CodeIgniter4-HMVC.git ci4_hmvc
10+
```
11+
Then
12+
```bash
13+
cd ci4_hmvc
14+
```
15+
16+
Copy some require file to root folder (Upgrading to v4.4.8)
17+
```bash
18+
composer update
19+
cp vendor/codeigniter4/framework/public/index.php public/index.php
20+
cp vendor/codeigniter4/framework/spark spark
21+
```
22+
23+
Copy `env` file
24+
```bash
25+
cp env .env
26+
```
27+
28+
Run the app, using different port, add options `--port=9000`
29+
```bash
30+
php spark serve
31+
```
32+
33+
---
34+
#### Installation Issue
35+
If you're facing any installation issue, [open a discussion](https://github.com/Simpletine/CodeIgniter4-HMVC/discussions) in community

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014-2019 British Columbia Institute of Technology
4+
Copyright (c) 2019-2024 CodeIgniter Foundation
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Codeigniter4-HMVC
2+
3+
[![Official Website](https://img.shields.io/badge/Official_Website-Visit-yellow)](https://simpletine.com)
4+
[![YouTube Channel](https://img.shields.io/badge/YouTube_Channel-Subscribe-FF0000)](https://www.youtube.com/channel/UCRuDf31rPyyC2PUbsMG0vZw)
5+
6+
### Prerequisites
7+
1. PHP 7.4 or above
8+
2. Composer required
9+
2. CodeIgniter 4.4.8
10+
11+
### Installation Guide
12+
For the guideline, see the [documentation](/INSTALLING.md)
13+
14+
---
15+
## Generate New Module
16+
```bash
17+
php spark make:module [module]
18+
```
19+
20+
### Example
21+
Create a blog module
22+
```bash
23+
php spark make:module blogs
24+
```
25+
26+
### Result Directory
27+
App
28+
├── Config
29+
│ └── Routes.php (Added group called blogs)
30+
├── Modules
31+
│ └── Blogs
32+
│ ├── Controllers
33+
│ └── Blogs.php
34+
│ ├── Models
35+
│ └── BlogsModel.php
36+
│ └── Views
37+
│ └── index.php
38+
└── ...
39+
40+
### Route Group
41+
After generate `Blogs` Module, add a route group for the module at `App\Config\Routes.php`
42+
```php
43+
$routes->group(
44+
'blogs', ['namespace' => '\Modules\Blogs\Controllers'], function ($routes) {
45+
$routes->get('/', 'Blogs::index');
46+
}
47+
);
48+
```
49+
50+
## PSR4
51+
At `App/Config/Autoload.php`, you can configure your custom namespace:
52+
```php
53+
public $psr4 = [
54+
// Sample
55+
"$module" => APPPATH . "$module",
56+
57+
// Base on Example above
58+
"Blogs" => APPPATH . "Modules/Blogs", // Example
59+
// ...
60+
];
61+
```
62+
---
63+
### Contribute
64+
To contribute to this repository and extend its architectural capabilities or you find an issue, follow these [steps](/CONTRIBUTE.md)

app/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

0 commit comments

Comments
 (0)