PHP code example of zara-4 / laravel-lazy-mysql
1. Go to this page and download the library: Download zara-4/laravel-lazy-mysql 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/ */
zara-4 / laravel-lazy-mysql example snippets
'providers' => [
// ...
Zara4\LazyMySql\ServiceProvider::class,
// ...
],
'mysql' => [
'read' => [
'database' => env('DB_READ_DATABASE', env('DB_DATABASE', 'default-database-name-goes-here')),
'host' => env('DB_READ_HOST', env('DB_HOST', 'default-read-database-host-goes-here')),
],
'write' => [
'database' => env('DB_WRITE_DATABASE', env('DB_DATABASE', 'default-database-name-goes-here')),
'host' => env('DB_WRITE_HOST', env('DB_HOST', 'default-write-database-host-goes-here')),
'options' => [
PDO::ATTR_PERSISTENT => true,
],
],
'driver' => 'lazy-mysql',
'username' => env('DB_USERNAME', 'default-username-goes-here'),
'password' => env('DB_PASSWORD', 'default-password-goes-here'),
'port' => env('DB_PORT', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
'options' => [
PDO::ATTR_PERSISTENT => true,
],