From 983b63897de449c87d0a2b6b25904580d67c4253 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 11 Mar 2024 19:54:52 -0300 Subject: [PATCH] definicion y migracion de producto sin nada --- app/Models/Producto.php | 17 ++++++++++++ ...24_03_11_224041_create_productos_table.php | 27 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 app/Models/Producto.php create mode 100644 database/migrations/2024_03_11_224041_create_productos_table.php diff --git a/app/Models/Producto.php b/app/Models/Producto.php new file mode 100644 index 0000000..ee30aac --- /dev/null +++ b/app/Models/Producto.php @@ -0,0 +1,17 @@ +belongsToMany(Pedido::class); + } +} diff --git a/database/migrations/2024_03_11_224041_create_productos_table.php b/database/migrations/2024_03_11_224041_create_productos_table.php new file mode 100644 index 0000000..e524043 --- /dev/null +++ b/database/migrations/2024_03_11_224041_create_productos_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('productos'); + } +};