From 884121243e849038f8dfd64ab4ceabe74033264e Mon Sep 17 00:00:00 2001 From: Pramod Singh Date: Thu, 19 Oct 2023 21:18:51 +0530 Subject: [PATCH] build: update version phpRestApi --- .env | 6 ++++++ README.md | 14 +++++++------- composer.json | 4 +++- env.php | 10 ---------- 4 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 .env delete mode 100644 env.php diff --git a/.env b/.env new file mode 100644 index 0000000..75fef73 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +# Database Variables +HOST_NAME = '' +USER_NAME = '' +PASSWORD = '' +DATABASE_NAME = '' +ACCESS_TOKEN = '' \ No newline at end of file diff --git a/README.md b/README.md index d579f6f..4deafa2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Php Rest API -This is create for start **Php Reset API** and easily manage and scale your database. +This is create for start **Php Rest API** and easily manage and scale your database. ## Installation Run the Composer command to install the latest stable version of RestJS: @@ -11,14 +11,14 @@ $ composer create-project restjs/restapi ## Getting Started - Create new **Database** with `database_name`. - Import php-rest-api.sql file in **MySQL Database**. -- Configure database variables in env.php: +- Configure database variables in .env: ``` -define('SERVER_NAME', ''); -define('USER_NAME', ''); -define('PASSWORD', ''); -define('DATABASE_NAME', ''); -define('ACCESS_TOKEN', ''); +HOST_NAME = '' +USER_NAME = '' +PASSWORD = '' +DATABASE_NAME = '' +ACCESS_TOKEN = '' ``` ### Used Feature diff --git a/composer.json b/composer.json index c364fc2..cbd6fdb 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,9 @@ "prefer-stable": true, "require": { "php": "7.1.*|7.2.*|7.3.*|7.4.*|8.0.*|8.1.*", - "restjs/php-rest-api": "^1.0" + "restjs/php-rest-api": "^2.0", + "vlucas/phpdotenv": "^5.5" + }, "scripts": { "post-create-project-cmd": [ diff --git a/env.php b/env.php deleted file mode 100644 index f6a7dd1..0000000 --- a/env.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file