protected function listMySQLUsers()
    {
        $this->url = $this->obtainAPIURLEndpointForList();
        $response = $this->http->get($this->url, [
                'headers' => [
                    'X-Requested-With' => 'XMLHttpRequest',
                    'Authorization' => 'Bearer ' . fp_env('ACACHA_FORGE_ACCESS_TOKEN')
                ]
            ]
        );

        $users = json_decode($response->getBody(), true) ;


        if ($this->option('dump')) {
            dump($users);
        }

        if (empty($users)) {
            $this->error('No users found.');
            die();
        }

        $headers = ['Id', 'Server Id','Name','Status','Created at'];

        $rows = [];
        foreach ($users as $user) {
            $rows[] = [
                $user['id'],
                $user['serverId'],
                $user['name'],
                $user['status'],
                $user['createdAt']
            ];
        }

        $this->table($headers, $rows);
    }
protected function listMySQLUsers()
    {
        $this->url = $this->obtainAPIURLEndpointForList();
        $response = $this->http->get($this->url, [
                'headers' => [
                    'X-Requested-With' => 'XMLHttpRequest',
                    'Authorization' => 'Bearer ' . fp_env('ACACHA_FORGE_ACCESS_TOKEN')
                ]
            ]
        );

        $users = json_decode($response->getBody(), true) ;


        if ($this->option('dump')) {
            dump($users);
        }

        if (empty($users)) {
            $this->error('No users found.');
            die();
        }

        $headers = ['Id', 'Server Id','Name','Status','Created at'];

        $rows = [];
        foreach ($users as $user) {
            $rows[] = [
                $user['id'],
                $user['serverId'],
                $user['name'],
                $user['status'],
                $user['createdAt']
            ];
        }

        $this->table($headers, $rows);
    }
protected function listMySQLUsers ( ) { $ this -> url = $ this -> obtainAPIURLEndpointForList ( ) ; $ response = $ this -> http -> get ( $ this -> url , [ 'headers' => [ 'X-Requested-With' => 'XMLHttpRequest' , 'Authorization' => 'Bearer ' . fp_env ( 'ACACHA_FORGE_ACCESS_TOKEN' ) ] ] ) ; $ users = json_decode ( $ response -> getBody ( ) , true ) ; if ( $ this -> option ( 'dump' ) ) { dump ( $ users ) ; } if ( empty ( $ users ) ) { $ this -> error ( 'No users found.' ) ; die ( ) ; } $ headers = [ 'Id' , 'Server Id' , 'Name' , 'Status' , 'Created at' ] ; $ rows = [ ] ; foreach ( $ users as $ user ) { $ rows [ ] = [ $ user [ 'id' ] , $ user [ 'serverId' ] , $ user [ 'name' ] , $ user [ 'status' ] , $ user [ 'createdAt' ] ] ; } $ this -> table ( $ headers , $ rows ) ; }
List MySQL users.
List MySQL users .