blob: 827c188697e2d403f73d4925d3dd3fd7d4f246dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
namespace app\controllers;
use app\models\Topic;
class TopicController extends \lithium\action\Controller {
public function index()
{
//We'll write this eventually
}
public function view($topicname)
{
$topic = Topic::find('first', array('conditions' => compact('topicname')));
}
public function new()
{
if ($this->request->data)
{
$topic = Topic::create($this->request->data);
$topic->save();
}
}
}
|