Good.php
659 Bytes
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Good extends Model
{
use HasFactory;
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');
}
}