'array', ]; /** * Get the hidden attributes for the model. * * @return array */ public function getHidden() { return [$this->getLftName(), $this->getRgtName()]; } /** * 查询只包含特定类型的内容. * * @param \Illuminate\Database\Eloquent\Builder $query * @param mixed $type * @return \Illuminate\Database\Eloquent\Builder */ public function scopeOfType($query, $type) { return $query->where('type', $type); } }