Product.php 805 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. public $timestamps = false;
  8. protected $fillable = [
  9. 'id',
  10. 'title',
  11. 'description',
  12. 'category',
  13. 'price',
  14. 'discount_percentage',
  15. 'rating',
  16. 'stock',
  17. 'brand',
  18. 'sku',
  19. 'weight',
  20. 'width',
  21. 'height',
  22. 'depth',
  23. 'warranty_information',
  24. 'shipment_information',
  25. 'availability_status',
  26. 'return_policy',
  27. 'minimum_order_quantity',
  28. 'barcode',
  29. 'qr_code',
  30. 'thumbnail',
  31. ];
  32. public function tags(): BelongsToMany
  33. {
  34. return $this->belongsToMany(Tag::class);
  35. }
  36. }