<?php

namespace App\Controllers;

class Pages extends BaseController {
	
	public function home() {
		$db = \Config\Database::connect();
		$sql = "select top 10 * from cmod.dbo.CM_TM_LOGS order by LOGDATE desc";
		$query = $db->query($sql);
		$results = $query->getResultArray();
		$data['messages'] = $results;
		
		return view('recent_messages', $data);
	}
	
}
