24 lines
594 B
PHP
24 lines
594 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\UuidPrimaryKey;
|
|
use App\Exceptions\ModelNotFoundException;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class CompraIngrediente extends Model {
|
|
use UuidPrimaryKey, SoftDeletes;
|
|
|
|
protected $table = 'compra_ingredientes';
|
|
protected $fillable = ['id', 'unidades', 'monto_unitario', 'compra_id', 'ingrediente_id'];
|
|
|
|
public function ingrediente() {
|
|
return $this->belongsTo(Ingrediente::class);
|
|
}
|
|
|
|
public function compra() {
|
|
return $this->belongsTo(Compra::class);
|
|
}
|
|
}
|