Files
unified-restaurant-original/backend/app/Models/CompraIngrediente.php

25 lines
662 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 $hidden = ['created_at', 'updated_at', 'deleted_at'];
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);
}
}