<?php

namespace Hilco\Models;

class WebFamilyLabel extends WebModel {
    protected $table = 'WebFamilyLabels';

    public function webFamilies() {
        return $this->belongsTo(WebFamily::class, 'label_name', 'label');
    }

    public static function getUACList() {
        $result[''] = 'None';
        $webFamilyLabels = WebFamilyLabel::orderBy('label_name')->get();
        foreach($webFamilyLabels as $webFamilyLabel) {
            $result[$webFamilyLabel->label_name] = $webFamilyLabel->label_name;
        }
        return $result;
    }
}