I want to ask to doophp with what way can I return my db data from the model -controller to my view.
Here is mycontroller:
`class CategoryController extends DooController {
public function Index(){
Doo::loadModel('Category');
$category = new Category;
Doo::db()->find( $category, array('limit'=>1) );
$this->view()->render('Category/Index', $category);
}
}
And I have a view (category.html) like this for example:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div>{{category.categoryname}}</div>
</body>
</html>`
The eseast way to do that is:
and then category.php