You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
318 B

<?php
namespace apps\base\models;
use base\Model;
class BaseModel extends Model {
/**
* 查询一条数据
* @return array
*/
public function one() {
$field = $this->options['field'];
$data = $this->find();
return isset($data[$field]) ? $data[$field] : array();
}
}