'department_id']; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.post_table')); } protected static function booted() { //创建时间倒序 static::addGlobalScope('sort', function (Builder $builder) { $builder->latest(); }); } }