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

namespace Hilco\Models;


class Translations_WebCategory extends WebModel
{
    protected $table = "Translations_WebCategories";

    public static function getTranslationByWebCategoryId($webCategoryId){
        $activeLanguage = b2b()->activeLanguage();
        if(isset($webCategoryId)){
            return Translations_WebCategory::where('language', '=', $activeLanguage)
                ->where('webcategory_id', '=', $webCategoryId)
                ->where('deleted_at', '=', "0000-00-00 00:00:00")
                ->first();
        }else{
            return null;
        }
    }
}