pdv.backend/app/Models/BundlePrice.php

28 lines
499 B
PHP

<?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BundlePrice extends Model
{
protected $fillable = [
'bundle_id',
'cost',
'retail_price',
'tax',
];
protected $casts = [
'cost' => 'decimal:2',
'retail_price' => 'decimal:2',
'tax' => 'decimal:2',
];
/**
* Bundle al que pertenece este precio
*/
public function bundle()
{
return $this->belongsTo(Bundle::class);
}
}