PHP codeigniter rest api
- Step One
- Copy "REST_Controller.php" and "Format.php" to "\application\libraries" Folder
- Replace your "language" Folder
- Copy "API" Folder into "controllers"
- Step Two
- Open Postmen
- Try Get Request "index.php/api/example/users"
"[
{
"id": 1,
"name": "John",
"email": "[email protected]",
"fact": "Loves coding"
},
{
"id": 2,
"name": "Jim",
"email": "[email protected]",
"fact": "Developed on CodeIgniter"
},
{
"id": 3,
"name": "Jane",
"email": "[email protected]",
"fact": "Lives in the USA",
"hobbies": [
"guitar",
"cycling"
]
}
]