?
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class PropertyImage extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'property_id',
'file_path',
'type',
'orderby',
'featured',
'highlight',
'primaryimage',
];
/**
* Get the property that owns the image.
* This defines a belongs-to relationship.
*/
public function property(): BelongsTo
{
return $this->belongsTo(Property::class);
}
}