Skip to content

Files

Latest commit

9ca8f34 · Aug 8, 2018

History

History
39 lines (37 loc) · 805 Bytes

README.md

File metadata and controls

39 lines (37 loc) · 805 Bytes

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"
  1. Step Two
  • Open Postmen
  • Try Get Request "index.php/api/example/users"
"[
  {
      "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 !!!