/
var
/
www
/
html
/
gnet_live
/
app
/
Models
/
Upload File
HOME
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class ProductImage extends Model { use HasFactory; protected $table = 'product_image'; protected $fillable = [ 'product_id', 'product_type_id', 'image_hd', 'image_low', 'image_hd_mobile', 'image_low_mobile', 'alt_text', ]; const CREATED_AT = 'created_at'; const UPDATED_AT = 'updated_at'; public function productImages(): BelongsTo { return $this->belongsTo(Product::class); } public function productTypeImages(): BelongsTo { return $this->belongsTo(ProductType::class); } }