From cbfe637f84a6199c6a7a270485f494de0c7fa77c Mon Sep 17 00:00:00 2001 From: iridium34 Date: Tue, 11 Mar 2025 12:23:46 +0100 Subject: [PATCH] added filamentstock in filaments --- ...7_add_filamentstock_to_filaments_table.php | 30 +++++++++++++++++++ resources/views/manufacturers/index.blade.php | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php diff --git a/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php b/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php new file mode 100644 index 0000000..28ac742 --- /dev/null +++ b/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php @@ -0,0 +1,30 @@ +integer('stock')->default(0); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('filaments', function (Blueprint $table) { + // removing stock from filaments table + $table->dropColumn('stock'); + }); + } +}; diff --git a/resources/views/manufacturers/index.blade.php b/resources/views/manufacturers/index.blade.php index ee330a8..74fa9af 100644 --- a/resources/views/manufacturers/index.blade.php +++ b/resources/views/manufacturers/index.blade.php @@ -17,8 +17,9 @@ Name - Count + Filaments Website + Stock Edit Delete @@ -29,6 +30,7 @@ {{ $manufacturer->name }} {{ $manufacturer->filament_count }} {{ $manufacturer->website }} @isset($manufacturer->website) @endisset +