model('Index'); // Perform database task with model $username = $model->getUsername(); // Display view with retrieved data $contr->view('index', [ "data" => $username ]);