I’m editing the script phppennyauctions and I would create new page that show the invoices (I’ve created a new tablet invoices in the DB).
I make the controllers, /admin/invoices ctp and mode invoice.php but when I go to site/invoices it download a blank page wiht name: download
How can I do?
<?php
class InvoicesController extends AppController {
var $name = 'Invoices';
var $helpers = array('Html', 'Form');
function beforeFilter(){
parent::beforeFilter();
}
function admin_index() {
$this->set('invoices', $this->paginate());
}
function admin_add() {
$this->set('invoices', $this->paginate());
}
}
?>
Your controller needs to be pulling a “view” to display, if it doesn’t have one it will react how you are describing. If you post your code I can be of better assistance.
Edit: Simply posting the /admin/invoices file should suffice.