database.php 856 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // config/database.php
  2. // database connection file
  3. <?php
  4. class Database
  5. {
  6. // specify your own database credentials
  7. private $host = 'localhost';
  8. private $db_name = 'mint';
  9. private $username = 'postgras';
  10. private $password = '123456';
  11. public $conn;
  12. // public function __construct() {
  13. // }
  14. public function EloquentConnection()
  15. {
  16. return [
  17. 'driver' => 'pgsql',
  18. 'host' => $this->host,
  19. 'database' => $this->db_name,
  20. 'port' => 5432,
  21. 'username' => $this->username,
  22. 'password' => $this->password,
  23. 'charset' => 'utf8',
  24. 'options' => [
  25. PDO::ATTR_PERSISTENT => true,
  26. ],
  27. 'prefix' => '',
  28. 'prefix_indexes' => true,
  29. 'schema' => 'public',
  30. 'sslmode' => 'prefer',
  31. ];
  32. }
  33. }