public function all() { $env = $this->parseFile(); $result = []; $env->each(function (Collection $value) use(&$result) { return $result[$value->first()] = $value->get(1); }); return $result; }
/** * Execute the console command. * * @return void */ public function handle() { $env = new Env(base_path('.env')); $data = []; foreach ($env->all() as $key => $value) { $data[] = [$key, $value]; } return $this->table(['Key', 'Value'], $data); }