From 239e95f5df00850af85e79940c92aea8aecbb6e8 Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Fri, 27 Oct 2023 13:57:24 +0700 Subject: [PATCH] add kolom active --- app/Models/FormulariumTemplate.php | 1 + ...10_add_column_to_formularium_templates.php | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 database/migrations/2023_10_27_134210_add_column_to_formularium_templates.php diff --git a/app/Models/FormulariumTemplate.php b/app/Models/FormulariumTemplate.php index afaca178..91bb22c0 100644 --- a/app/Models/FormulariumTemplate.php +++ b/app/Models/FormulariumTemplate.php @@ -13,6 +13,7 @@ class FormulariumTemplate extends Model protected $fillable = [ 'name', 'description', + 'active', ]; protected $hidden = [ diff --git a/database/migrations/2023_10_27_134210_add_column_to_formularium_templates.php b/database/migrations/2023_10_27_134210_add_column_to_formularium_templates.php new file mode 100644 index 00000000..2b9830d2 --- /dev/null +++ b/database/migrations/2023_10_27_134210_add_column_to_formularium_templates.php @@ -0,0 +1,32 @@ +tinyInteger('active')->default(1)->after('description'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('formularium_templates', function (Blueprint $table) { + $table->dropColumn('active'); + }); + } +};