public function index($test = false) { if ($test) { return array('foo' => 'bar'); } return 'List of posts'; }