【发布时间】:2017-09-11 09:53:32
【问题描述】:
我想在所有控制器函数中添加这些辅助函数
// this is my helper file custom_helper.php
// $autoload['helper'] = array('url','form', 'custom_helper');
function notifications()
{
$CI = get_instance();
$CI->load->model('custom_model');
$select = "id, name";
$tableName = "users";
$whereCondition = "created_at = CURDATE()";
$result = $CI->custom_model
->FetchWithSelect($select,$tableName,$whereCondition);
return $result;
}
【问题讨论】:
标签: php codeigniter