Where to put reusable codes in CakePHP


MODEL
If you have codes that can be reused for your models put it inside
behaviors

VIEW
If you have codes that can be reused for your views put it inside
helpers
elements
layout

CONTROLLERS
If you have codes that can be reused for your controllers put it inside
components

Advertisements

One Response to “Where to put reusable codes in CakePHP”

  1. […] Tips to where to put your reusable codes Click here […]

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: