Tuesday, November 17, 2015

Call and use helper in controller Cakephp

Somebody said that there would have many ways to call Helper to use in view , but inspire I would show you how to implement it in Controller.php class YourContrller extends Objects{ pubic function yourfunction() { App::import('Helper', 'String'); $string = new StringHelper(new View()); ...

Saturday, November 14, 2015

Monday, November 9, 2015

Get properties from beforefilter in Cakephp to other function

That is just a trick which most of the developers are still wondering that is there a ways to get some properties from beforefilter in Cakephp to use in other function ? so here is the ways to do. AppController.php public function beforeFilter() { $user_id = ($this->Auth->user('id') != ''...