src/Jackiedo/DotenvEditor/Console/Commands/DotenvGetKeysCommand.php
public function fire()
    {
        $filePath       = $this->stringToType($this->option('filepath'));
        $this->filePath = (is_string($filePath)) ? base_path($filePath) : null;

        $allKeys = $this->editor->load($this->filePath)->getKeys();
        $output = [];
        foreach ($allKeys as $key => $info) {
            $data = [
                'key'     => $key,
                'export'  => ($info['export']) ? 'true' : 'false',
                'value'   => $info['value'],
                'comment' => $info['comment'],
                'line'    => $info['line']
            ];
            $output[] = $data;
        }

        $total   = count($output);

        $headers = ['Key', 'Use export', 'Value', 'Comment', 'In line'];

        $this->line('Loading keys in your file...');
        $this->line('');
        $this->table($headers, $output);
        $this->line('');
        $this->info("You have total {$total} keys in your file");
    }
public function fire()
    {
        $filePath       = $this->stringToType($this->option('filepath'));
        $this->filePath = (is_string($filePath)) ? base_path($filePath) : null;

        $allKeys = $this->editor->load($this->filePath)->getKeys();
        $output = [];
        foreach ($allKeys as $key => $info) {
            $data = [
                'key'     => $key,
                'export'  => ($info['export']) ? 'true' : 'false',
                'value'   => $info['value'],
                'comment' => $info['comment'],
                'line'    => $info['line']
            ];
            $output[] = $data;
        }

        $total   = count($output);

        $headers = ['Key', 'Use export', 'Value', 'Comment', 'In line'];

        $this->line('Loading keys in your file...');
        $this->line('');
        $this->table($headers, $output);
        $this->line('');
        $this->info("You have total {$total} keys in your file");
    }
public function fire ( ) { $ filePath = $ this -> stringToType ( $ this -> option ( 'filepath' ) ) ; $ this -> filePath = ( is_string ( $ filePath ) ) ? base_path ( $ filePath ) : null ; $ allKeys = $ this -> editor -> load ( $ this -> filePath ) -> getKeys ( ) ; $ output = [ ] ; foreach ( $ allKeys as $ key => $ info ) { $ data = [ 'key' => $ key , 'export' => ( $ info [ 'export' ] ) ? 'true' : 'false' , 'value' => $ info [ 'value' ] , 'comment' => $ info [ 'comment' ] , 'line' => $ info [ 'line' ] ] ; $ output [ ] = $ data ; } $ total = count ( $ output ) ; $ headers = [ 'Key' , 'Use export' , 'Value' , 'Comment' , 'In line' ] ; $ this -> line ( 'Loading keys in your file...' ) ; $ this -> line ( '' ) ; $ this -> table ( $ headers , $ output ) ; $ this -> line ( '' ) ; $ this -> info ( "You have total {$total} keys in your file" ) ; }
Execute the console command.

@return mixed
Execute the console command .