Posts Tagged ‘cakephp’

CakePHP: How to call an action of another controller

by on Wednesday, July 24th, 2013


<?php
App::uses('AppController', 'Controller');
App::uses('EmployeesController', 'Controller');

class ReportingController extends AppController {

public function some(){

$Employees = new EmployeesController;
$Employees->constructClasses();

$Employees->areasAssigned();//areasAssigned function is in the Employees controller.

}

}

?>

How to print the sql dump in cake php

by on Wednesday, February 27th, 2013

$db = ConnectionManager::getDataSource('default');
$db->showLog();

CakePHP cake bake command

by on Tuesday, January 8th, 2013

step 1: set path to environment variable. like:

C:\xampp\php;C:\xampp\htdocs\yourproject\lib\cake\console\;

step 2: open command prompt and type

cd C:\xampp\htdocs\yourproject\app  and press enter.

step 3: now type cake bake

now you can see the options there. you can continue accordingly.