'datetime:Y-m-d H:i:s', 'updated_at' => 'datetime:Y-m-d H:i:s', ]; //名称 protected $titleColumn = 'name'; //排序 protected $orderColumn = 'order'; //父级 protected $parentColumn = 'parent_id'; protected $table = 'base_product_category'; /* * 关联产品参数 */ public function baseProductParameter() { return $this->hasOne(BaseProductParameter::class,'id','parameter_id'); } public static function selectOptions(\Closure $closure = null) { $options = (new static())->withQuery($closure)->buildSelectOptions(); return collect($options)->all(); } }