I seem to get the 500 error when trying to query the database (mongodb) if I remove the query it display the view fine. From using the quick start guide and other online tutorials I carnt see that I am doing anything wrong.
Model - Posts.php
<?php
namespace app\models;
class Posts extends \lithium\data\Model {
}
Controller - PostsController.php
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2015, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
namespace app\controllers;
use app\models\Posts;
class PostsController extends \lithium\action\Controller {
public function index() {
$posts = Posts::find('all', array(
'conditions' => array('author' => 'tom')
));
return $this->render(array('layout' => false));
}
}
?>
View - index.html.php
Contains some text no php as trying to get it working first.