<?php

namespace App\Models;

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

class Slider extends Model implements TranslatableContract
{
   use Translatable;
   
   protected $table = 'sliders';
    public $timestamps = false;
     protected $dateFormat = 'U';
    protected $guarded = ['id'];
    		
      public $translatedAttributes = ['text', 'title', 'button_title'];
      
      public function getTitleAttribute()
    {
        return getTranslateAttributeValue($this, 'title');
    }

    public function getTextAttribute()
    {
        return getTranslateAttributeValue($this, 'text');
    }
    
    public function getButtonTitleAttribute()
    {
        return getTranslateAttributeValue($this, 'button_title');
    }
}
