PHP code example of hubert / avocado-postgres-driver
1. Go to this page and download the library: Download hubert/avocado-postgres-driver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hubert / avocado-postgres-driver example snippets
#[Configuration]
class DataSourceConfiguration {
public function __construct(){}
#[Leaf]
public function dataSource(): DataSource {
return (new DataSourceBuilder())
->server("...")
->databaseName("...")
->username("...")
->password("...")
->port("...")
->charset("...")
->driver(PostgreSQLDriver::class)
->build();
}
}