<?php
/**
 * Created by PhpStorm.
 * User: steven
 * Date: 12/6/18
 * Time: 1:26 PM
 */

namespace Hilco\Models;


class Translations_WebFamily extends WebModel
{
    protected $table = "Translations_WebFamilies";

    public static function getTranslationByWebFamilyId($webFamilyId){
        $activeLanguage = b2b()->activeLanguage();
        if(isset($webFamilyId)){
            return Translations_WebFamily::where('language', '=', $activeLanguage)
                ->where('webfamily_id', '=', $webFamilyId)
                ->where('deleted_at', '=', "0000-00-00 00:00:00")
                ->first();
        }else{
            return null;
        }
    }
}