OwlCyberSecurity - MANAGER
Edit File: InvoiceTaraItem.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class InvoiceTaraItem extends Model { use HasFactory, SoftDeletes; protected $table = 'invoice_tara_items'; protected $fillable = [ 'name', 'slug_item', 'count', 'ischecked', 'isapproved', 'unapprovedescription', 'transportprice', 'itemprice', 'prefactorcomment', 'image', 'product_id', 'invoice_id', 'weight', ]; protected $casts = [ 'ischecked' => 'boolean', 'isapproved' => 'boolean', 'breakable' => 'boolean', ]; // Relationships public function invoice() { return $this->belongsTo(InvoiceTara::class,'invoice_id', 'id'); } public function product() { return $this->belongsTo(Product::class, 'product_id','id'); } }