Blame view
app/Models/Good.php
834 Bytes
b80175387 Начальный проект ... |
1 2 3 4 5 6 7 8 9 10 |
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Good extends Model { use HasFactory; |
1bd0c6ebe Админка, товары. ... |
11 12 13 14 15 16 17 18 19 20 21 |
protected $fillable = ['title', 'image', 'category_id', 'price', 'price_old', 'manufacturer', 'country', 'size', 'power', 'description', 'feature', 'equipment', 'accessory_id', 'tooling_id', 'weight', 'new', 'stock_count', 'demo', 'way', 'type_good' ]; public function category() { return $this->belongsTo(Category::class, 'category_id'); } |
0cbcbfbe0 Дополнительные ка... |
22 23 24 25 26 27 28 |
/* * Связь объектов товаров с фотогалереей */ public function images() { return $this->hasMany(Images::class); } |
b80175387 Начальный проект ... |
29 |
} |