示例#1
0
 public function addCard($array)
 {
     if ($id = parent::getModel()->insert($array)) {
         return $id;
     } else {
         return false;
     }
 }
示例#2
0
 /**
  * 保存文件
  * @method saveName
  * @param  [type]   $name [description]
  * @return [type]         [description]
  * @author NewFuture
  */
 public static function saveName($fid, $name)
 {
     if ($name = File::filterName($name)) {
         return parent::where('use_id', Auth::id())->set('name', $name)->save($fid);
     }
 }
示例#3
0
 public function school()
 {
     /*用户属于一所学校*/
     parent::getModel()->belongs('school');
     return $this;
 }