<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Doctor extends Model 
{

    protected $table = 'doctors';
    public $timestamps = true;
    protected $fillable = ['name', 'description','image','video','specialty_id','salary','percentage','percentage_new'];

    use SoftDeletes;

    protected $dates = ['deleted_at'];

    public function specialties()
    {
        return $this->belongsToMany('App\SpecialtyTrain');
    }

    public function branches()
    {
        return $this->belongsToMany('App\BranchUser','branch_users','user_id','branch_id','2');
    }

}