From daaf18944dfc20bc926fe03754f8cf8ef4600560 Mon Sep 17 00:00:00 2001 From: sayliraut Date: Thu, 13 Jun 2024 17:35:55 +0530 Subject: [PATCH] change --- app/Http/Controllers/Admin/ManageNewsAndArticlesController.php | 1 - .../migrations/2024_01_22_100217_create_news_articles_table.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php b/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php index dc5efcd..ddf065b 100644 --- a/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php +++ b/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php @@ -260,7 +260,6 @@ public function insert(Request $request) $blog->name = $request->input('article_name'); $blog->description = $request->input('article_des'); $blog->news_articles_category_xid = $request->input('category'); - $blog->is_active = '1'; if ($request->hasFile('article_image')) { $uploadedFile = $request->file('article_image'); diff --git a/database/migrations/2024_01_22_100217_create_news_articles_table.php b/database/migrations/2024_01_22_100217_create_news_articles_table.php index 3135cb8..8b8c864 100644 --- a/database/migrations/2024_01_22_100217_create_news_articles_table.php +++ b/database/migrations/2024_01_22_100217_create_news_articles_table.php @@ -19,7 +19,7 @@ return new class extends Migration $table->longText('description'); $table->string('thumbnail_image'); $table->string('image'); - $table->enum('is_active',['0','1'])->comment('0 = Active, 1 = Inactive'); + $table->enum('is_active',['0','1'])->default(1)->comment('0 = Active, 1 = Inactive'); $table->softDeletes(); $table->timestamps();