<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;

class TrendCategory extends Model
{
     use Translatable;
    protected $table = 'trend_categories';
    public $timestamps = false;
    protected $dateFormat = 'U';
    protected $guarded = ['id'];
    
    public $translatedAttributes = ['title','courses_no'];

    /*public function category()
    {
        return $this->belongsTo('App\Models\Category', 'category_id', 'id');
    }*/

    /**
     * @return mixed
     */
    public function getIcon()
    {
        return $this->icon;
    }
    
     public function getTitleAttribute()
    {
        return getTranslateAttributeValue($this, 'title');
    }
}
