class Controller_Example extends \Controller_Template {
public $template = 'example/index';
public function action_index() {
$this->template->testimonials = Model_Example::get_list();
$this->template->content = \View::factory('example/index');
}
}
class Model_Example extends \Model {
protected static $table = 'mytable';
public static function get_list($count = 100) {
$result = \Fuel\Core\DB::select('title','content')->from(static::$table)->limit($count)->order_by('title', 'asc')->execute();
return $result->as_array();
}
}
public function action_index() {
$data = array( );
$data[ 'success' ] = Request::factory( 'example/example/index/')->execute();
$this->response->body = View::factory( 'welcome/index', $data );
}
public function action_index() {
$this->response->body = View::factory( 'welcome/index');
$this->response->body->set('success', Request::factory( 'example/example/index/')->execute(), false);
}
It looks like you're new here. If you want to get involved, click one of these buttons!