<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PartnerDetail extends Model
{
    public $timestamps = false;
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [ 'image' ];
    

    public static function withDescription()
    {
        return self::join('partner_detail_descriptions as dDesc', 'dDesc.partner_detail_id', 'partner_details.id')
            ->where('dDesc.language_id', currentLanguage()->id)
            ->select(['dDesc.*', 'partner_details.image'])->first();
    }
}
