pai-sklep/app/Models/Product.php
2021-12-08 21:45:36 +01:00

25 lines
439 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->morphMany(Image::class, 'imageable');
}
protected $fillable = [
'name',
'description',
'images',
'price'
];
}