2024-03-04 15:37:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2024-03-19 12:47:27 -07:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
2024-03-04 15:37:29 +01:00
|
|
|
|
|
|
|
class Photo extends Model
|
|
|
|
{
|
2024-03-04 17:32:45 +01:00
|
|
|
use HasFactory;
|
2024-03-04 15:37:29 +01:00
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'image_src',
|
|
|
|
'description',
|
|
|
|
'alt_text',
|
|
|
|
];
|
2024-03-19 12:47:27 -07:00
|
|
|
|
|
|
|
public function post(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Photo::class);
|
|
|
|
}
|
2024-03-04 15:37:29 +01:00
|
|
|
}
|