<?php

namespace App;

use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

/**
 * App\EmailSenderDefine
 * @mixin Eloquent
 * @property int $idemail_sender_define
 * @property string|null $driver
 * @property string|null $host
 * @property string|null $username_email
 * @property string|null $password
 * @property string|null $encryption
 * @property int|null $aktivni
 * @property string|null $zmena
 * @method static Builder|EmailSenderDefine whereAktivni($value)
 * @method static Builder|EmailSenderDefine whereDriver($value)
 * @method static Builder|EmailSenderDefine whereEncryption($value)
 * @method static Builder|EmailSenderDefine whereHost($value)
 * @method static Builder|EmailSenderDefine whereIdemailSenderDefine($value)
 * @method static Builder|EmailSenderDefine wherePassword($value)
 * @method static Builder|EmailSenderDefine whereUsernameEmail($value)
 * @method static Builder|EmailSenderDefine whereZmena($value)
 */
class EmailSenderDefine extends Model
{
    protected $table = 'email_sender_define';
    protected $primaryKey = 'idemail_sender_define';
    protected $fillable = ['driver','host','username_email','password', 'encryption','vlozil', 'aktivni','zmena','port'];
    public $timestamps = false;


    public static function getDataEmail()
    {
        return self::all()->where('aktivni', '=', 1)->first()->get();

    }
}
