pai-sklep/app/Models/Product.php
2021-11-14 20:44:10 +01:00

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