Files
nl-mall-api/app/Models/ProductModel.php

24 lines
439 B
PHP
Raw Normal View History

2025-05-19 16:54:25 +08:00
<?php
namespace App\Models;
use App\BaseApp\BaseModel;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ProductModel extends BaseModel
{
protected $table = 'product';
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $guarded = [];
public function images(): HasMany
{
return $this->hasMany(ProductImageModel::class, 'product_id', 'id');
}
}