From 99431bc64fe67deb83e639c8e4568a800bbd32da Mon Sep 17 00:00:00 2001 From: ale Date: Tue, 12 Mar 2024 17:17:42 -0300 Subject: [PATCH] =?UTF-8?q?definici=C3=B3n=20y=20migraci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Caracteristica.php | 17 +++++++++++ ...12_201127_create_caracteristicas_table.php | 28 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 app/Models/Caracteristica.php create mode 100644 database/migrations/2024_03_12_201127_create_caracteristicas_table.php diff --git a/app/Models/Caracteristica.php b/app/Models/Caracteristica.php new file mode 100644 index 0000000..d978baa --- /dev/null +++ b/app/Models/Caracteristica.php @@ -0,0 +1,17 @@ +belongsToMany(Producto::class); + } +} diff --git a/database/migrations/2024_03_12_201127_create_caracteristicas_table.php b/database/migrations/2024_03_12_201127_create_caracteristicas_table.php new file mode 100644 index 0000000..c12f53e --- /dev/null +++ b/database/migrations/2024_03_12_201127_create_caracteristicas_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('name', 100); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('caracteristicas'); + } +};