22 lines
410 B
PHP
22 lines
410 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Product extends Model
|
|
{
|
|
use HasFactory;
|
|
use HasUUID;
|
|
public $primaryKey = "uuid";
|
|
|
|
public function images() {
|
|
return $this->hasMany(Image::class, "product_uuid", "uuid");
|
|
}
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
];
|
|
}
|