<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Reason extends Model
{
    //
    use SoftDeletes;
    protected $fillable = [
        'id',
        ];
    /**
     * Get the description of the category.
     * @return HasMany
     */
    public function descriptions($language_id= 0) :HasMany
    {
        if ($language_id) {
            return $this->hasMany(CategoryDescription::class)->where('language_id', $language_id);
        }
        return $this->hasMany(CategoryDescription::class);
    }
}
