Sindbad~EG File Manager

Current Path : /home/zada/public_html/app/Models/
Upload File :
Current File : /home/zada/public_html/app/Models/NotificationType.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App;

class NotificationType extends Model
{
    public function getTranslation($field = '', $lang = false)
    {
        $lang = $lang == false ? App::getLocale() : $lang;
        $notificationTypeTtranslation = $this->notificationTypeTranslations->where('lang', $lang)->first();
        return $notificationTypeTtranslation != null ? $notificationTypeTtranslation->$field : $this->$field;
    }

    public function notificationTypeTranslations()
    {
        return $this->hasMany(NotificationTypeTranslation::class);
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists (>^ω^<)看过哭02teddd(>^ω^<)看过哭02teddd