parsaaghayi-backend/app/Models/Website/Project.php
parsa aghaei 37dd2c9d54
Some checks failed
Deploy Backend / deploy (push) Failing after 1m52s
2.1-2.4: install spatie/laravel-translatable, migrate to JSON, update models & controllers
2026-06-23 18:31:51 +03:30

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');
}
}