24 lines
439 B
PHP
24 lines
439 B
PHP
<?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');
|
|
}
|
|
}
|