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

23 lines
530 B
PHP

<?php
namespace App\Models\Website;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
class Project extends Model
{
use HasFactory, HasTranslations;
protected $table = 'website_projects';
protected $fillable = ['category_id', 'image1', 'image2'];
protected array $translatable = ['title', 'description'];
public function category()
{
return $this->belongsTo(ProjectCategory::class, 'category_id');
}
}