From 9ca8f345aee7df07701ccf372887e59380d825f0 Mon Sep 17 00:00:00 2001 From: Damith Thiwanka Date: Wed, 8 Aug 2018 14:49:12 +0530 Subject: [PATCH] Update README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 4fe98e3..0549578 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,39 @@ # codeigniter-rest-api PHP codeigniter rest api + +# Setup +1. Step One + * Copy "REST_Controller.php" and "Format.php" to "\application\libraries" Folder + * Replace your "language" Folder + * Copy "API" Folder into "controllers" + +2. Step Two + * Open Postmen + * Try Get Request "index.php/api/example/users" + ```JSON + "[ + { + "id": 1, + "name": "John", + "email": "john@example.com", + "fact": "Loves coding" + }, + { + "id": 2, + "name": "Jim", + "email": "jim@example.com", + "fact": "Developed on CodeIgniter" + }, + { + "id": 3, + "name": "Jane", + "email": "jane@example.com", + "fact": "Lives in the USA", + "hobbies": [ + "guitar", + "cycling" + ] + } +] +``` + ### Enjoy !!!