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.
 
 
 
 
 

27 lines
560 B

<?php
namespace App\Http\Model;
class Region extends BaseModel
{
//地区
protected $table = 'region';
public $timestamps = false;
public static function getRegionName($id)
{
if(empty($id) || $id==0){return '';}
return self::where('id', $id)->value('name');
}
public static function getList($parent_id=86)
{
return self::where('parent_id', $parent_id)->get();
}
public static function getOne($id)
{
return self::where('id', $id)->first();
}
}