<?php

namespace Content\Lib;

use Dever;

class Xuniren
{
    # 获取几条数据
    public function getHome($limit = 10)
    {
        $where = array();

        $where['limit'] = '0,' . $limit;
        $data = Dever::db('content/xuniren')->getHome($where);

        if ($data) {
            foreach ($data as $k => $v) {
                $data[$k]['link'] = Dever::url('main/xnr-detail?id=' . $v['id']);
            }
        }

        return $data;
    }
}