File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ GenyPHP is a lightweight, easy-to-use PHP framework designed for building web ap
10
10
git clone https://github.com/bellash13/GenyPHP.git
11
11
```
12
12
Alternatively, you can download the directory and start coding your valuable application
13
+
13
14
2 . ** Navigate to the Project Directory**
14
15
``` sh
15
16
cd GenyPHP
@@ -42,20 +43,20 @@ Alternatively, you can download the directory and start coding your valuable app
42
43
class HomeController extends Controller {
43
44
public function index() {
44
45
$data = ['title' => 'Welcome to GenyPHP!'];
45
- $this->render('index', $data);
46
+ $this->render('Home/ index', $data);
46
47
}
47
48
}
48
49
```
49
50
50
- 3 . ** Creating Views with Layouts**
51
+ 3 . ** Creating Views with custom Layouts**
51
52
Store your views in ` App/Views ` . Example ` Home/index.php ` :
52
53
``` html
53
54
<h1 >Welcome to GenyPHP!</h1 >
54
55
<p ><?=$title?></p >
55
56
```
56
57
For layouts, use ` App/Views/Shared/layout.php ` and include views dynamically:
57
58
``` php
58
- $this->renderLayout('Shared/layout', ' Home/index', $data);
59
+ $this->renderLayout('Home/index', $data, 'Shared/layout' );
59
60
```
60
61
61
62
4 . ** Public Directory**
You can’t perform that action at this time.
0 commit comments