PHP code example of litermi / aws-database-client
1. Go to this page and download the library: Download litermi/aws-database-client 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/ */
litermi / aws-database-client example snippets
'providers' => [
// ...
Litermi\Database\Providers\ServiceProvider::class,
],
'providers' => [
CirelRamos\Database\Providers\DatabaseServiceProvider::class,
]
$mysqlConnection = env('TYPE_MYSQL_CONNECTION', null);
$mysql = [
'driver' => 'vault',
];
if ($mysqlConnection === 'local' || $mysqlConnection === null) {
$mysql = [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'apitrillo'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'root'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET_MYSQL', 'utf8mb4'),
'collation' => env('DB_COLLECTION_MYSQL' , 'utf8mb4_unicode_ci'),
'prefix' => '',
'modes' => [
'NO_UNSIGNED_SUBTRACTION',
'NO_ENGINE_SUBSTITUTION',
],
'engine' => null,
];
}
$database = [
// .
// .
'connections' => [
// .
// .
'mysql' => $mysql,
// .
// .
]
]
return $database;
sh
php artisan vendor:publish --provider="Litermi\Database\Providers\ServiceProvider"