This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyModel extends AppModel { | |
public function __construct($id = false, $table = null, $ds = null) { | |
parent::__construct($id, $table, $ds); | |
$this->order = array( | |
$this->alias . '.weight ASC', | |
$this->alias . '.name ASC', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::import('Lib', 'routes/SluggableRoute'); | |
Router::connect( | |
'/path-alias/:slug/*', | |
array( | |
'controller' => 'controller_name', | |
'action' => 'action_name', | |
'model' => 'ModelName', | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->Client->find('all', array( | |
'conditions' => array( | |
), | |
'joins' => array( | |
array( | |
'table' => 'projects', | |
'alias' => 'ProjectJoin', | |
'type' => 'INNER', | |
'conditions' => array( |
NewerOlder