From 0d81745906b3647d6f99f2b6d020f21b98944171 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Fri, 1 Dec 2023 10:31:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20app/Console/ModelFillable.?= =?UTF-8?q?php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/ModelFillable.php | 54 ----------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 app/Console/ModelFillable.php diff --git a/app/Console/ModelFillable.php b/app/Console/ModelFillable.php deleted file mode 100644 index c193e33..0000000 --- a/app/Console/ModelFillable.php +++ /dev/null @@ -1,54 +0,0 @@ -argument('table'); - $ignore = ['id', 'created_at', 'updated_at', 'deleted_at']; - $connection = $this->option('connection'); - if (! $connection) { - $connection = config('database.default'); - } - - if (Schema::connection($connection)->hasTable($table)) { - $list = Schema::connection($connection)->getColumnListing($table); - $list = array_filter($list, function ($value) use ($ignore) { - return ! in_array($value, $ignore); - }); - $this->info("protected \$fillable = ['".implode('\', \'', $list)."'];"); - } - } -}