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 | |
/** | |
* Application level Controller | |
* | |
* This file is application-wide controller file. You can put all | |
* application-wide controller-related methods here. | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* |
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 | |
/**model**/ | |
App::uses('AppModel', 'Model'); | |
/** | |
* User Model | |
* | |
* @property Wishlist $Wishlist |
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 | |
//view | |
// view Users/cadastro.ctp | |
$this->Form->create(false,array('controller'=>'designers','action'=>'register')); | |
$this->Form->input('whatever'); | |
$this->Form->submit('save'); | |
$this->Form->end(); | |
$this->Form->create(false,array('controller'=>'users','action'=>'register')); |
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
//View | |
<?php | |
foreach ($response->subcategory as $subcategory) { | |
$s = $subcategory->subcategory; | |
echo "Imagem: <img src='{$s->thumbnail->url}'><br />"; | |
echo "Nome: {$s->name}<br />"; | |
echo "link da subcategoria: {$this->Html->link($s->name, array( |
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 | |
/** | |
* Controller | |
*/ | |
public function getDados($id = null){ | |
$dados = $this->Model->find('all',array('conditions'=>array($this->Model->primaryKey => $id))); | |
$this->set(compact('dados')); //isso significa que a variavel $dados é compactada em 'dados' no set compact, mas você pode enviar asssim tb | |
//$this->set('dados',$dados); | |
} |
NewerOlder