<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Language extends Model
{
    use HasFactory;

    protected $fillable = [
        'code',
        'name',
        'direction',
    ];


    public function translations()
    {
        return $this->hasMany(Translate::class, 'lang', 'code');
    }
}
