Loading...
Sunday 26 May 2013

Creating Simple To Do List in CakePHP

In the previous tutorial Installing and Running CakePHP we learnt how to download and configure cakephp for our system in this tutorial we will be creating a simple to do list application in which we can insert , delete and edit data so let's get's started.


-> copy this code and paste in the item.php file and paste it in the app->model folder
 <?php  
  class Item extends AppModel{   
  var $name = "Item"   
  }  
 ?>  




-> now copy this code and paste in the itemscontroller.php file and paste this file in app->controller folder
 <?php  
 class ItemsController extends AppController{  
 var $name = "Items"  
 var $scaffold;  
 }  
 ?>  




->now write localhost/todo/items in your web browser you will see a form by which you can insert data into table and basic CRUD operation which is given by cakephp without any effort to you guys 

Note: Never forget to write var before $name and $scaffold. Else your Application will not work and will give you errors 

Below is the screenshot when you will achieve all of the above steps.

feel free to comment if you have any queries. and share with others please it's my original work I am working hard on cakephp 

0 comments:

Post a Comment

Enter your Comments about this post

 
TOP