File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ Related projects:
2121
2222This is a single file application! Upload "api.php" somewhere and enjoy!
2323
24+ Alternatively, you can use [ Composer] ( https://getcomposer.org/ ) . See the _ Composer Installation_ section below.
25+
2426## Limitations
2527
2628 - Primary keys should either be auto-increment (from 1 to 2^53) or UUID
@@ -1028,6 +1030,39 @@ string(6) "/posts"
10281030
10291031If it does not, something is wrong on your hosting environment.
10301032
1033+ ## Composer Installation
1034+
1035+ - Include the library in your composer.json file:
1036+
1037+ ``` json
1038+ {
1039+ "require" : {
1040+ "mevdschee/php-crud-api" : " dev-master"
1041+ }
1042+ }
1043+ ```
1044+
1045+ - Run ` composer install `
1046+ - Use the library in your own code:
1047+
1048+ ``` php
1049+ <?php
1050+
1051+ include './vendor/autoload.php';
1052+
1053+ // DB Connection
1054+ $api = new PHP_CRUD_API(array(
1055+ 'dbengine'=>'MySQL',
1056+ 'hostname'=>'localhost',
1057+ 'username'=>'',
1058+ 'password'=>'',
1059+ 'database'=>'',
1060+ 'charset'=>'utf8'
1061+ ));
1062+ $api->executeCommand();
1063+
1064+ ```
1065+
10311066## License
10321067
10331068MIT
You can’t perform that action at this time.
0 commit comments