parsaaghayi-backend/app/Models/Website/ServiceTranslation.php

23 lines
574 B
PHP

<?php
namespace App\Models\Website;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ServiceTranslation extends Model
{
use HasFactory;
protected $table = 'website_service_translations'; // نام جدول
protected $fillable = ['service_id', 'locale', 'title', 'description']; // فیلدهایی که قابل پر کردن هستند
/**
* ارتباط با جدول خدمات
*/
public function service()
{
return $this->belongsTo(Service::class, 'service_id');
}
}