Files
RomhackPlaza/app/Models/Gallery.php

35 lines
1.3 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)
* @mixin \Eloquent
*/
class Gallery extends Model
{
protected $table = 'galleries';
protected $fillable = ['image', 'galleryable_id', 'galleryable_type'];
public function galleryable(): MorphTo
{
return $this->morphTo();
}
}