Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
added postgres database configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed May 11, 2022
1 parent c509dfb commit 58bbb88
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

use Illuminate\Support\Str;

$URL = 'postgres://ozcdqwwymsramg:53456c87a4066b7a920fae16235d5d8832816db16b44345c26e8a5d646553a4b@ec2-54-164-40-66.compute-1.amazonaws.com:5432/dd0c256e7u4141';
$DATABASE_URL=parse_url($URL);

return [

/*
Expand All @@ -15,7 +18,7 @@
|
*/

'default' => env('DB_CONNECTION', 'mysql'),
'default' => env('DB_CONNECTION', 'pgsql'),

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -65,12 +68,12 @@

'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'url' => $URL,
'host' => $DATABASE_URL["host"],
'port' => $DATABASE_URL["port"],
'database' => ltrim($DATABASE_URL["path"], "/"),
'username' => $DATABASE_URL["user"],
'password' => $DATABASE_URL["pass"],
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
Expand Down

0 comments on commit 58bbb88

Please sign in to comment.