You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -48,7 +48,7 @@ phpcore framework is a simple and easy to use MVC framework for web application
48
48
public function __construct() {
49
49
try {
50
50
parent::__construct();
51
-
$this->Route->SetWebRoutes($this->WebRoutes);
51
+
$this->Route->setWebRoutes($this->WebRoutes);
52
52
}
53
53
catch (Exception $e) {
54
54
throw $e;
@@ -67,7 +67,7 @@ phpcore framework is a simple and easy to use MVC framework for web application
67
67
?>
68
68
69
69
```
70
-
5. Create controllers folder [project folder]/src/server/controllers and then create a controller in controllers [project folder]/src/server/controllers/HomeController.php
70
+
5. Create a HomeController [project folder]/src/server/controllers/HomeController.php
71
71
```php
72
72
<?php
73
73
namespace phpcore\controllers;
@@ -86,7 +86,7 @@ phpcore framework is a simple and easy to use MVC framework for web application
86
86
}
87
87
?>
88
88
```
89
-
6. Create views folder [project folder]/src/server/views and create a view for HomeController [project folder]/src/server/views/Home.php
89
+
6. Create a view for HomeController [project folder]/src/server/views/Home.php
90
90
```html
91
91
<!DOCTYPE html>
92
92
<html lang="en">
@@ -103,8 +103,8 @@ phpcore framework is a simple and easy to use MVC framework for web application
103
103
104
104
## Web API
105
105
Steps to create a Web API with phpcore framework.
106
-
1. Follow steps 1 to 3 from quick start to setup new project.
@@ -124,7 +124,7 @@ Steps to create a Web API with phpcore framework.
124
124
public function __construct() {
125
125
try {
126
126
parent::__construct();
127
-
$this->Route->SetApiRoutes($this->ApiRoutes);
127
+
$this->Route->setApiRoutes($this->ApiRoutes);
128
128
}
129
129
catch (Exception $e) {
130
130
throw $e;
@@ -146,7 +146,7 @@ Steps to create a Web API with phpcore framework.
146
146
}
147
147
?>
148
148
```
149
-
3. Create API controllers folder [project folder]/src/server/controllers/api and then create a API controller [project folder]/src/server/controllers/api/GetInfoController.php
149
+
3. Create an API controller [project folder]/src/server/controllers/api/GetInfoController.php
150
150
```php
151
151
<?php
152
152
namespace phpcore\controllers\api;
@@ -215,13 +215,13 @@ Steps to create a Web API with phpcore framework.
215
215
216
216
## Use Doctrine 2 to work with database
217
217
This example will create a Web API that returns data from SQLite with Doctrine, make sure that SQLite PDO has been enabled in PHP configuration.
218
-
1. Follow steps 1 to 3 from quick start to setup new project.
218
+
1. Follow steps 1 to 3 from Quick start to setup new project.
219
219
2. Modify file [project folder]/composer.json
220
220
```json
221
221
{
222
222
"name": "thnguyendev/phpcore",
223
223
"description": "The phpcore framework.",
224
-
"version": "2.0.0",
224
+
"version": "2.0.1",
225
225
"keywords": ["framework", "phpcore"],
226
226
"license": "MIT",
227
227
"type": "project",
@@ -357,7 +357,7 @@ This example will create a Web API that returns data from SQLite with Doctrine,
@@ -399,7 +399,7 @@ This example will create a Web API that returns data from SQLite with Doctrine,
399
399
}
400
400
?>
401
401
```
402
-
7. Create API controllers folder [project folder]/src/server/controllers/api and then create a API controller [project folder]/src/server/controllers/api/GetInfoController.php
402
+
7. Create a API controller [project folder]/src/server/controllers/api/GetInfoController.php
0 commit comments