pai-sklep/app/Models/Product.php
2021-11-29 15:46:29 +01:00

23 lines
414 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',
];
}