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
Copy file name to clipboardExpand all lines: README.md
+63-3
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,62 @@ This framework can be easily integrated into any PHP project using Composer.
15
15
-**Meta Data**: The response includes metadata such as response code, server host, number of results, and script execution time.
16
16
-**Data Type Management**: Support for defining and managing data types for each parameter.
17
17
18
+
## Installation via Composer
19
+
20
+
To use the **PHP-Api Framework** in your project, follow these steps:
21
+
22
+
### 1. Install Composer
23
+
24
+
Ensure that [Composer](https://getcomposer.org/) is installed on your system. If it's not installed yet, you can install it using the following command:
25
+
26
+
```bash
27
+
curl -sS https://getcomposer.org/installer | php
28
+
```
29
+
30
+
### 2. Add the Framework to Your Project
31
+
32
+
To install the framework from GitHub, specify the `develop` branch. You can do this by running the following command:
33
+
34
+
```bash
35
+
composer require devt045t/php-api:develop
36
+
```
37
+
38
+
Alternatively, if the package is not listed on Packagist, you can add the GitHub repository manually in your `composer.json` under the `"repositories"` section:
39
+
40
+
```json
41
+
{
42
+
"repositories": [
43
+
{
44
+
"type": "git",
45
+
"url": "https://github.com/DevT045T/php-api.git"
46
+
}
47
+
],
48
+
"require": {
49
+
"devt045t/php-api": "develop"
50
+
}
51
+
}
52
+
```
53
+
54
+
Then run:
55
+
56
+
```bash
57
+
composer install
58
+
```
59
+
60
+
This will install the framework from the `develop` branch and download all necessary files.
61
+
62
+
### 3. Enable Autoloading
63
+
64
+
Ensure that Composer's autoloader is included in your project. Add this line at the beginning of your PHP file:
65
+
66
+
```php
67
+
require 'vendor/autoload.php';
68
+
```
69
+
70
+
### 4. Use the Framework
71
+
72
+
You can now use the framework in your project. For more information on how to use it, refer to the [Usage](#Usage) section of this documentation.
73
+
18
74
## Usage
19
75
20
76
### Example: Define Allowed Parameters and Handle API Request
0 commit comments