You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
385 B
PHP
25 lines
385 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class SaleItem extends Model
|
|
{
|
|
protected $fillable = [
|
|
'sale_id',
|
|
'product_id',
|
|
'price',
|
|
'cost',
|
|
'quantity',
|
|
];
|
|
|
|
public function product()
|
|
{
|
|
return $this->belongsTo(Product::class)->withTrashed();
|
|
}
|
|
|
|
public function sale()
|
|
{
|
|
return $this->belongsTo(Sale::class);
|
|
}
|
|
}
|