> For the complete documentation index, see [llms.txt](https://prtechs-organization.gitbook.io/e2encrypt-frame-php/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prtechs-organization.gitbook.io/e2encrypt-frame-php/configurations/database-setup.md).

# Database Setup

```php
public $database = array(
        'host' => 'hostname',
        'user' => 'username',
        'pass' => 'password',
        'dbase' => 'database'
);
```

After That Load the Library in the Controller

```php
public $db;
function __construct(){
    $this->db = $this->library("db");
}
```

Full Controller Code with Database Loaded

```php
<?php
class Welcome extends Controller{
    public $defaultController = "index";

    public $db;
    function __construct(){
        $this->db = $this->library("db");
    }

    public function index(){
        $this->view("hello-e2e");
    }
}
```
