<?php

class StranasDashboardController extends BaseController
{
    
    public function index()
    {
        $userTableau = 'webviewer';
        $serverTableau = 'statistik.kpk.go.id';
        $view_url = 'views/Stranas_Capaian_Pemda/CapaianRenaksiWilayah';

        try {

            $tableau_client = new Tableau(); 
            $tab_resp = $tableau_client->get_trusted_url_tableau($userTableau, $serverTableau, $view_url);

            return new CollectionPaginatedResponse([$tab_resp]);

        } catch (\Throwable $th) {
            echo "error<br>";
            echo "<pre>";
            echo "$th";
            echo "</pre>";
            die();
            
            return ['error_message' => $th];
        }
    }
}
