Step1: Create a database and a table say "users"
Step2: Now we will create the Users Model, Veiw and Controller.
Step2: Now we will create the Users Model, Veiw and Controller.
- users model:
- class User extends AppModel {
- }
- <?php
- class RestUsersController extends AppController {
- public $uses = array('User');
- public $helpers = array('Html', 'Form');
- public $components = array('RequestHandler');
- public function index() {
- $users = $this->User->find('all');
- $this->set(array(
- 'users' => $users,
- '_serialize' => array('users')
- ));
- }
- public function add() {
- Read the complete Blog at: Creating RESTful API in Cakephp
FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.
Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java developer Forum
FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.
Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java developer Forum