Files
unified-restaurant-original/backend/app/Models/Receta.php
2021-07-20 15:27:55 -04:00

24 lines
571 B
PHP

<?php
namespace App\Models;
use App\Traits\UuidPrimaryKey;
use App\Exceptions\ModelNotFoundException;
use Illuminate\Database\Eloquent\Model;
class Receta extends Model {
use UuidPrimaryKey;
protected $table = 'recetas';
protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot'];
protected $fillable = ['unidades', 'producto_id', 'ingrediente_id'];
public function ingrediente() {
return $this->belongsTo(Ingrediente::class);
}
public function producto() {
return $this->belongsTo(Producto::class);
}
}