Create a model Post

Create a model file named post.php under model direction. and mode are class, so create a class named post, and all model class extends the appModel class.

so my model it looks like this

class Post extends AppModel {
    var $name = “Post”;//this don’t need it ,but this is good for php4
}

that is all we need for model

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s