Last active
December 10, 2015 06:18
-
-
Save wouterds/4393793 to your computer and use it in GitHub Desktop.
Shurl CakePHP HomeController
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::uses('AppController', 'Controller'); | |
class HomeController extends AppController { | |
public function index() { | |
// Load Author model | |
$this->loadModel('Author'); | |
// Load Authors controller | |
App::import('Controller', 'Authors'); | |
// Get current author id | |
$authorId = AuthorsController::getId(); | |
debug('Author ID: ' . $authorId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment