This commit is contained in:
User
2024-12-27 20:43:18 -05:00
parent 89d0394de9
commit da918835c2
84 changed files with 6160 additions and 1068 deletions

36
app/Models/Image.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Image extends Model
{
protected $fillable = [
'comic_id',
'chapter_id',
'order',
'url',
'metadata',
];
protected function casts(): array
{
return [
'metadata' => 'json',
];
}
public function chapter(): BelongsTo
{
return $this->belongsTo(Chapter::class);
}
public function comic(): BelongsTo
{
return $this->belongsTo(Comic::class);
}
}