Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Set column name for auth component of users table

When we use Auth component for login in cake php then we are restricted to use 2 column in users table 'password' and 'username' .If we want to use our own column name then follow these steps: Step 1: Include the below function in YoursController...

Remove wrapper from HTML element in cakePHP

In cakePHP, if you are using default render elements of cakePHP, then wrappers are automatically add. For removing wrappers from HTML element use the following syntax:- Form->input('email_address', array( 'div'=>false, 'labe...

Cakephp - Using Config.php

We can use config.php in cakephp to define constant which need to be used in our whole project example we have different role id for different users.We can define those user corresponding to their role id and can easily access them through out ...

Naming convention in cakephp

Naming convention in cakephp To get Maximum advantages from Cakephp then we need to follow some basic naming convention that cakephp rules says. Naming convention follows principles of following section of cakephp Database name Contr...

Delete files from folder in cakephp 2.X

If anyone wants to delete file from the folder can use this code. App::uses('File', 'Utility'); $file = new File(WWW_ROOT .'subcategory/thumbs/abc.jpg', false, 0777); if($file->delete()) { echo "File Deleted"; }

How use auth login in different model in cakephp

How use auth login in different model in cakephp public $components = array('Session', 'Cookie', 'Auth' => array( 'authenticate' => array('Form' => array( 'userModel' => 'Admin', 'fields' ...

Internationalization of cakephp site

Internationalization of cakephp site: STEP 1) Write the following code in cakePhp routes.php file Router::connect('/:language/:controller/:action/*', array(), array('language' => '[a-z]{3}')); ...

Cakephp - Using multiple database

Many a times we need use multiple database as per the domain or some other reason . We can easily achieve it with the following code in cakePhp. Write the following code in app->config->database.php class DATABASE_CONFIG { publ...

Cakephp - Using Auth

We can use Auth component in cakephp for authentication and authorization objects. Since it easy and secure way to do this. Write following in your App controller public $components = array( 'Auth' => array('loginAction...

Simple Cakephp Pagination

Cakephp provides a quick an easy way to paginate data. In the controller we start by creating the pagination condition as given below : public $paginate = array( 'limit' => 10, 'order' => array( ...

Cakephp - Removing setFlash bar

We can get rid of the flash message shown on a webpage in cakephp using setFlash method without refreshing the page by the help of simple Jquery function. flashMessage is the default html id used by the cakephp while showing flash message. ...
1 4 6 next
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: