Files
RomhackPlaza/app/Models/Gallery.php
2026-06-16 16:21:43 +02:00

42 lines
1.7 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
* @property int $id
* @property int $entry_id
* @property string $image
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereEntryId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereImage($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereUpdatedAt($value)
* @property string $galleryable_type
* @property int $galleryable_id
* @property-read Model|\Eloquent $galleryable
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereGalleryableId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereGalleryableType($value)
* @property int $order
* @method static \Illuminate\Database\Eloquent\Builder<static>|Gallery whereOrder($value)
* @mixin \Eloquent
*/
class Gallery extends Model
{
protected $table = 'galleries';
protected $fillable = ['image', 'galleryable_id', 'galleryable_type'];
public function galleryable(): MorphTo
{
return $this->morphTo();
}
}