'integer', 'system_id' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; /** * 获取启用的应用 */ public function scopeActive($query) { return $query->where('status', 1); } /** * 关联公司 */ public function company() { return $this->belongsTo(Company::class, 'company_id'); } }