Product.php 773 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsToMany;
  5. class Product extends Model
  6. {
  7. protected $fillable = [
  8. 'id',
  9. 'title',
  10. 'description',
  11. 'category',
  12. 'price',
  13. 'discount_percentage',
  14. 'rating',
  15. 'stock',
  16. 'brand',
  17. 'sku',
  18. 'weight',
  19. 'width',
  20. 'height',
  21. 'depth',
  22. 'warranty_information',
  23. 'shipment_information',
  24. 'availability_status',
  25. 'return_policy',
  26. 'minimum_order_quantity',
  27. 'barcode',
  28. 'qr_code',
  29. 'thumbnail',
  30. ];
  31. public function tags(): BelongsToMany
  32. {
  33. return $this->belongsToMany(Tag::class);
  34. }
  35. }