File "SubscriptionFeature.php"

Full Path: /home/trinadezambia/public_html/admin_panel/app/Models/SubscriptionFeature.php
File size: 839 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\DateFormatTrait;

class SubscriptionFeature extends Model
{
    use HasFactory, DateFormatTrait;
    protected $fillable = ['subscription_id','feature_id'];
    protected $connection = 'mysql';

    /**
     * Get the feature that owns the SubscriptionFeature
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function feature()
    {
        return $this->belongsTo(Feature::class);
    }

    public function getCreatedAtAttribute()
    {
        return $this->formatDateValue($this->getRawOriginal('created_at'));
    }

    public function getUpdatedAtAttribute()
    {
        return $this->formatDateValue($this->getRawOriginal('updated_at'));
    }
}