ekart/backend/app/Models/ProductImage.php
kusowl 684b7585bb feature: product creation and image upload
create image upload endpoint
create product creation endpoint
create get product categories endpoint
2026-02-26 19:03:41 +05:30

20 lines
338 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ProductImage extends Model
{
protected $fillable = [
'path',
'product_id',
];
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
}
}