1
- # Laravel Database URI
2
- Drop-in package to translate a database URI into database config values. No more need to add logic to your
1
+ # Laravel Database URL
2
+ Drop-in package to translate a database URL into database config values. No more need to add logic to your
3
3
` config/database.php ` file.
4
4
5
- This is meant to help prevent the need for manually parsing database URIs , like the ones that come from Heroku or AWS.
6
- It will take a URI and assign host, password, username, port, (etc.) components to the default driver or
5
+ This is meant to help prevent the need for manually parsing database URLs , like the ones that come from Heroku or AWS.
6
+ It will take a URL and assign host, password, username, port, (etc.) components to the default driver or
7
7
specific driver(s) of your choosing.
8
8
9
9
This __ will override__ , at runtime, any ` default ` database connection values for ` host ` , ` port ` , ` username ` , ` password ` , and ` database `
@@ -14,12 +14,12 @@ This __will override__, at runtime, any `default` database connection values for
14
14
- Laravel >= 5.6
15
15
16
16
## Installation
17
- ` $ composer require rootinc/laravel-db-uri `
17
+ ` $ composer require rootinc/laravel-db-url `
18
18
19
19
## Configuration
20
20
The package will automatically map the parsed values from the environment variable ` DATABASE_URL ` to the ` default ` database connection.
21
21
22
- Add a ` DATABASE_URL ` entry to your ` .env ` or server environment with a URI to your default database.
22
+ Add a ` DATABASE_URL ` entry to your ` .env ` or server environment with a URL to your default database.
23
23
` DATABASE_URL=postgresql://username:password@localhost:5432/database-name `
24
24
25
25
This will overwrite database connection values for ` host ` , ` port ` , ` username ` , ` password ` , and ` database `
@@ -28,12 +28,12 @@ This will overwrite database connection values for `host`, `port`, `username`, `
28
28
## Customization
29
29
Override default behaviour by publishing the config file and setting values.
30
30
31
- ` $ php artisan vendor:publish --tag=db-uri `
31
+ ` $ php artisan vendor:publish --tag=db-url `
32
32
33
33
Set any database connections by supplying ` default ` or the key path, like ` connections.pgsql ` , or ` redis `
34
34
to have a URL mapped onto the connection at that key path.
35
35
36
- config/db-uri .php
36
+ config/db-url .php
37
37
```
38
38
return [
39
39
'default' => 'SOME_DATABASE_URL', // "default" resolves key path from default key
0 commit comments