<?php
/**
 * Created by PhpStorm.
 * User: steven
 * Date: 12/7/18
 * Time: 11:42 AM
 */

namespace Hilco\Models;


class Translations_WebGroup extends WebModel
{
    protected $table = "Translations_WebGroups";

    public static function getTranslationByWebGroupId($webGroupId){
        $activeLanguage = b2b()->activeLanguage();
        if(isset($webGroupId)){
            $translation = Translations_WebGroup::where('language', '=', $activeLanguage)
                ->where('webgroup_id', '=', $webGroupId)
                ->where('deleted_at', '=', "0000-00-00 00:00:00")
                ->first();
//            $translation = null;
            return $translation;
        }else{
            return null;
        }
    }

}