<?php

namespace App\Models;

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

class Language extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $guarded = [];

    public function engineer()
    {
        return $this->morphedByMany(Engineer::class, 'languagable');
    }

    public function project()
    {
        return $this->morphedByMany(Project::class, 'languagable');
    }
}
