argument('name'); $columns = []; if (class_exists("App\\Models\\{$name}")) { $model = app("App\\Models\\{$name}"); $columns = $model->getFillable(); } if (Schema::hasTable($name)) { $columns = Schema::getColumnListing($name); } if (count($columns) <= 0) { return $this->error("{$name} 不存在"); } foreach($columns as $key) { $this->info("'{$key}' => \$this->{$key},"); } } }