ProductImage.php 428 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Shop\ProductImages;
  3. use App\Shop\Products\Product;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ProductImage extends Model
  6. {
  7. protected $fillable = [
  8. 'product_id',
  9. 'src'
  10. ];
  11. public $timestamps = false;
  12. /**
  13. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  14. */
  15. public function product()
  16. {
  17. return $this->belongsTo(Product::class);
  18. }
  19. }