Agrega Productos y sus recetas

This commit is contained in:
2021-07-12 19:10:43 -04:00
parent df5238850e
commit d3713e2f93
10 changed files with 408 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ use App\Models\ZonaProduccion;
use App\Models\Categoria;
use App\Models\Proveedor;
use App\Models\Ingrediente;
use App\Models\Producto;
use App\Traits\UuidPrimaryKey;
use App\Exceptions\ModelNotFoundException;
use Illuminate\Database\Eloquent\Model;
@@ -55,4 +56,8 @@ class Restaurante extends Model {
public function ingredientes() {
return $this->hasMany(Ingrediente::class, 'restaurante_id');
}
public function productos() {
return $this->hasMany(Producto::class, 'restaurante_id');
}
}